Exemplo n.º 1
0
 public function testShouldNotGenerateConfirmationCodeIfExists()
 {
     $this->populateUser();
     // Considering the model was already saved (this will make sure to
     // not trigger the ConfideRepository::userExists method)
     $this->confide_user->id = 1;
     $old_cc = $this->confide_user->confirmation_code;
     $this->assertTrue($this->confide_user->save());
     $new_cc = $this->confide_user->confirmation_code;
     // Should not change confirmation code
     $this->assertEquals($old_cc, $new_cc);
 }