mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-10 12:24:50 +00:00
Fix some tests.
This commit is contained in:
@@ -49,7 +49,7 @@ class ConfirmationControllerTest extends TestCase
|
||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthEnabled', false])->andReturn($falsePreference);
|
||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret'])->andReturn(null);
|
||||
|
||||
FireflyConfig::shouldReceive('get')->withArgs(['must_confirm_account', false])->once()->andReturn($trueConfig);
|
||||
FireflyConfig::shouldReceive('get')->withArgs(['must_confirm_account', false])->andReturn($trueConfig);
|
||||
$this->be($this->user());
|
||||
$this->call('GET', route('confirmation_error'));
|
||||
$this->assertResponseStatus(200);
|
||||
@@ -100,11 +100,11 @@ class ConfirmationControllerTest extends TestCase
|
||||
Preferences::shouldReceive('get')->withArgs(['user_confirmed_last_mail', 0])->andReturn($timePreference);
|
||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthEnabled', false])->andReturn($falsePreference);
|
||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret'])->andReturn(null);
|
||||
FireflyConfig::shouldReceive('get')->withArgs(['must_confirm_account', false])->once()->andReturn($trueConfig);
|
||||
FireflyConfig::shouldReceive('get')->withArgs(['must_confirm_account', false])->andReturn($trueConfig);
|
||||
Preferences::shouldReceive('get')->withArgs(['user_confirmed', false])->andReturn($falsePreference);
|
||||
|
||||
// from event handler:
|
||||
Preferences::shouldReceive('setForUser')->withAnyArgs()->once();
|
||||
Preferences::shouldReceive('setForUser')->withAnyArgs();
|
||||
|
||||
$this->be($this->user());
|
||||
$this->call('GET', route('resend_confirmation'));
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* ForgotPasswordControllerTest.php
|
||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This software may be modified and distributed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||
*
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace Auth;
|
||||
|
||||
use TestCase;
|
||||
|
||||
/**
|
||||
* Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:31.
|
||||
*/
|
||||
class ForgotPasswordControllerTest extends TestCase
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Auth\ForgotPasswordController::broker
|
||||
* Implement testBroker().
|
||||
*/
|
||||
public function testBroker()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Auth\ForgotPasswordController::sendResetLinkEmail
|
||||
* Implement testSendResetLinkEmail().
|
||||
*/
|
||||
public function testSendResetLinkEmail()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Auth\ForgotPasswordController::showLinkRequestForm
|
||||
* Implement testShowLinkRequestForm().
|
||||
*/
|
||||
public function testShowLinkRequestForm()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tears down the fixture, for example, closes a network connection.
|
||||
* This method is called after a test is executed.
|
||||
*/
|
||||
protected function tearDown()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -35,10 +35,12 @@ class LoginControllerTest extends TestCase
|
||||
*/
|
||||
public function testLogin()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
$this->visit('/login')
|
||||
->type('thegrumpydictator@gmail.com', 'email')
|
||||
->type('james', 'password')
|
||||
->press('Sign In')
|
||||
->seePageIs('/')
|
||||
->see('thegrumpydictator@gmail.com');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -47,22 +49,9 @@ class LoginControllerTest extends TestCase
|
||||
*/
|
||||
public function testLogout()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Auth\LoginController::redirectPath
|
||||
* Implement testRedirectPath().
|
||||
*/
|
||||
public function testRedirectPath()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
$this->visit('/logout')
|
||||
->seePageIs('/login')
|
||||
->see('Sign in to start your session');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -71,22 +60,9 @@ class LoginControllerTest extends TestCase
|
||||
*/
|
||||
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\LoginController::username
|
||||
* Implement testUsername().
|
||||
*/
|
||||
public function testUsername()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
$this->visit('/')
|
||||
->seePageIs('/login')
|
||||
->see('Sign in to start your session');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
*/
|
||||
class HomeControllerTest extends TestCase
|
||||
{
|
||||
public function displayError()
|
||||
{
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\HomeController::dateRange
|
||||
@@ -80,7 +76,7 @@ class HomeControllerTest extends TestCase
|
||||
{
|
||||
$this->be($this->user());
|
||||
$this->changeDateRange($this->user(), $range);
|
||||
$this->call('GET', route('allRoutes'));
|
||||
$this->call('GET', route('all-routes'));
|
||||
$this->assertResponseStatus(200);
|
||||
}
|
||||
|
||||
@@ -90,7 +86,7 @@ class HomeControllerTest extends TestCase
|
||||
public function testTestFlash()
|
||||
{
|
||||
$this->be($this->user());
|
||||
$this->call('GET', route('testFlash'));
|
||||
$this->call('GET', route('test-flash'));
|
||||
$this->assertResponseStatus(302);
|
||||
$this->assertSessionHas('success');
|
||||
$this->assertSessionHas('info');
|
||||
|
||||
Reference in New Issue
Block a user