Implemented some tests.

This commit is contained in:
James Cole
2016-01-20 09:15:33 +01:00
parent ebdb1a8836
commit 2faf84780f
7 changed files with 176 additions and 246 deletions

View File

@@ -47,7 +47,6 @@ class AuthControllerTest extends TestCase
public function testLogin()
{
$response = $this->call('GET', '/login');
$this->assertSessionHas('isLoggedIn', 'yes');
$this->assertEquals(200, $response->status());
}
@@ -79,7 +78,11 @@ class AuthControllerTest extends TestCase
];
$response = $this->call('POST', '/login', $args);
$this->assertEquals(302, $response->status());
$this->assertSessionHas('isLoggedIn', 'yes');
$response = $this->call('GET', '/');
$this->assertEquals(200, $response->status());
}
@@ -98,51 +101,12 @@ class AuthControllerTest extends TestCase
$this->assertSessionHas('start');
}
/**
* @covers FireflyIII\Http\Controllers\Auth\AuthController::redirectPath
* @todo Implement testRedirectPath().
*/
public function testRedirectPath()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
/**
* @covers FireflyIII\Http\Controllers\Auth\AuthController::register
* @todo Implement testRegister().
*/
public function testRegister()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
/**
* @covers FireflyIII\Http\Controllers\Auth\AuthController::showLoginForm
* @todo Implement testShowLoginForm().
*/
public function testShowLoginForm()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
/**
* @covers FireflyIII\Http\Controllers\Auth\AuthController::showRegistrationForm
* @todo Implement testShowRegistrationForm().
*/
public function testShowRegistrationForm()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$response = $this->call('GET', '/register');
$this->assertEquals(200, $response->status());
}
}

View File

@@ -12,124 +12,17 @@
*/
class PasswordControllerTest extends TestCase
{
/**
* @covers FireflyIII\Http\Controllers\Auth\PasswordController::getBroker
* @todo Implement testGetBroker().
*/
public function testGetBroker()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
/**
* @covers FireflyIII\Http\Controllers\Auth\PasswordController::getEmail
* @todo Implement testGetEmail().
*/
public function testGetEmail()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
/**
* @covers FireflyIII\Http\Controllers\Auth\PasswordController::getReset
* @todo Implement testGetReset().
*/
public function testGetReset()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
/**
* @covers FireflyIII\Http\Controllers\Auth\PasswordController::postEmail
* @todo Implement testPostEmail().
*/
public function testPostEmail()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
/**
* @covers FireflyIII\Http\Controllers\Auth\PasswordController::postReset
* @todo Implement testPostReset().
*/
public function testPostReset()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
/**
* @covers FireflyIII\Http\Controllers\Auth\PasswordController::redirectPath
* @todo Implement testRedirectPath().
*/
public function testRedirectPath()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
/**
* @covers FireflyIII\Http\Controllers\Auth\PasswordController::reset
* @todo Implement testReset().
*/
public function testReset()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
/**
* @covers FireflyIII\Http\Controllers\Auth\PasswordController::sendResetLinkEmail
* @todo Implement testSendResetLinkEmail().
*/
public function testSendResetLinkEmail()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$args = [
'email' => 'thegrumpydictator@gmail.com',
'_token' => Session::token(),
];
$response = $this->call('POST', '/password/email', $args);
$this->assertEquals(302, $response->status());
}
/**
* @covers FireflyIII\Http\Controllers\Auth\PasswordController::showLinkRequestForm
* @todo Implement testShowLinkRequestForm().
*/
public function testShowLinkRequestForm()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
/**
* @covers FireflyIII\Http\Controllers\Auth\PasswordController::showResetForm
* @todo Implement testShowResetForm().
*/
public function testShowResetForm()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
}