Skip to content

Commit

Permalink
SomeCleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
JustTheDude001 committed May 16, 2024
1 parent d00eb6f commit 2bfb290
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions tests/Feature/Service/User/RegisterUserServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,11 @@ public function test_required_fields_for_user_creation()
'dni' => '27827083G'
]);

$this->expectException(Exception::class);
$this->userService->createUser($registerData1);


//$this->expectException(Exception::class);
$success = $this->userService->createUser($registerData1);
//$this->assertEquals(False, $success);
$this->assertEquals(True, empty($success['email']) == False && empty($success['token']) == False );

// Missing 'email' field
$registerData2 = new RegisterRequest([
'username' => 'test_username',
Expand Down Expand Up @@ -217,16 +218,10 @@ public function test_required_fields_for_user_creation_my(array $array, bool $re
'dni' => $array['dni'] ?? "",
]);

//$this->expectException(Exception::class);
//$this->userService->createUser($registerData1);
$success = $this->userService->createUser($registerData);
//$this->assertEquals(False, $succes);
//$this->assertEquals($this->validationMessage, $succes);


if($resultCorrect){
//$this->assertEquals($this->validationMessage, $succes);
$this->assertEquals(True, empty($success['email']) == False && empty($success['token']) == False );

}else{
$this->assertEquals($resultCorrect, $success);
}
Expand Down

0 comments on commit 2bfb290

Please sign in to comment.