More cleanup.

This commit is contained in:
James Cole
2016-01-24 18:11:57 +01:00
parent 7b2fe8eb4a
commit a013553a6c
18 changed files with 227 additions and 225 deletions

View File

@@ -18,8 +18,8 @@ class AuthControllerTest extends TestCase
*/
public function testGetLogin()
{
$response = $this->call('GET', '/login');
$this->assertEquals(200, $response->status());
$this->call('GET', '/login');
$this->assertResponseStatus(200);
}
/**
@@ -28,8 +28,8 @@ class AuthControllerTest extends TestCase
public function testGetLogout()
{
$this->be($this->user());
$response = $this->call('GET', '/logout');
$this->assertEquals(302, $response->status());
$this->call('GET', '/logout');
$this->assertResponseStatus(302);
}
/**
@@ -37,8 +37,8 @@ class AuthControllerTest extends TestCase
*/
public function testGetRegister()
{
$response = $this->call('GET', '/register');
$this->assertEquals(200, $response->status());
$this->call('GET', '/register');
$this->assertResponseStatus(200);
}
/**
@@ -46,8 +46,8 @@ class AuthControllerTest extends TestCase
*/
public function testLogin()
{
$response = $this->call('GET', '/login');
$this->assertEquals(200, $response->status());
$this->call('GET', '/login');
$this->assertResponseStatus(200);
}
/**
@@ -56,11 +56,12 @@ class AuthControllerTest extends TestCase
public function testLogout()
{
$this->be($this->user());
$response = $this->call('GET', '/logout');
$this->assertEquals(302, $response->status());
$this->call('GET', '/logout');
$this->assertResponseStatus(302);
// index should now redirect:
$response = $this->call('GET', '/');
$this->assertEquals(302, $response->status());
$this->call('GET', '/');
$this->assertResponseStatus(302);
}
@@ -75,11 +76,11 @@ class AuthControllerTest extends TestCase
'password' => 'james',
'remember' => 1,
];
$response = $this->call('POST', '/login', $args);
$this->assertEquals(302, $response->status());
$this->call('POST', '/login', $args);
$this->assertResponseStatus(302);
$response = $this->call('GET', '/');
$this->assertEquals(200, $response->status());
$this->call('GET', '/');
$this->assertResponseStatus(200);
}
@@ -94,8 +95,8 @@ class AuthControllerTest extends TestCase
'password' => 'james123',
'password_confirmation' => 'james123',
];
$response = $this->call('POST', '/register', $args);
$this->assertEquals(302, $response->status());
$this->call('POST', '/register', $args);
$this->assertResponseStatus(302);
$this->assertSessionHas('start');
}
@@ -104,7 +105,7 @@ class AuthControllerTest extends TestCase
*/
public function testRegister()
{
$response = $this->call('GET', '/register');
$this->assertEquals(200, $response->status());
$this->call('GET', '/register');
$this->assertResponseStatus(200);
}
}