Skip to content

Commit

Permalink
Fix various test methods naming
Browse files Browse the repository at this point in the history
  • Loading branch information
francescomalatesta committed Nov 17, 2016
1 parent 4f511db commit 80fa354
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ForgotPasswordControllerTest extends TestCase
{
use DatabaseMigrations;

public function testSuccessfulForgotPassword()
public function testForgotPasswordRecoverySuccessfully()
{
$this->post('api/recovery', [
'email' => 'test@email.com'
Expand All @@ -19,7 +19,7 @@ public function testSuccessfulForgotPassword()
])->assertResponseOk();
}

public function testForgotPasswordWithNotFoundUser()
public function testForgotPasswordRecoveryReturnsUserNotFoundError()
{
$this->post('api/recovery', [
'email' => 'unknown@email.com'
Expand All @@ -28,7 +28,7 @@ public function testForgotPasswordWithNotFoundUser()
])->assertResponseStatus(404);
}

public function testForgotPasswordWithValidationErrors()
public function testForgotPasswordRecoveryReturnsValidationErrors()
{
$this->post('api/recovery', [
'email' => 'i am not an email'
Expand Down
6 changes: 3 additions & 3 deletions tests/Functional/Api/V1/Controllers/LoginControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class LoginControllerTest extends TestCase
{
use DatabaseMigrations;

public function testSuccessfulLogin()
public function testLoginSuccessfully()
{
$this->post('api/login', [
'email' => 'test@email.com',
Expand All @@ -24,7 +24,7 @@ public function testSuccessfulLogin()
])->assertResponseOk();
}

public function testLoginWithWrongCredentials()
public function testLoginWithReturnsWrongCredentialsError()
{
$this->post('api/login', [
'email' => 'unknown@email.com',
Expand All @@ -34,7 +34,7 @@ public function testLoginWithWrongCredentials()
])->assertResponseStatus(403);
}

public function testLoginWithBadRequest()
public function testLoginWithReturnsValidationError()
{
$this->post('api/login', [
'email' => 'test@email.com'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function testSignUpSuccessfullyWithTokenRelease()
])->assertResponseStatus(201);
}

public function testSignUpValidationError()
public function testSignUpReturnsValidationError()
{
$this->post('api/signup', [
'name' => 'Test User',
Expand Down

0 comments on commit 80fa354

Please sign in to comment.