mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 10:53:37 +00:00
Should fix the tests
This commit is contained in:
@@ -38,7 +38,7 @@ class TwoFactorController extends Controller
|
|||||||
$secret = Preferences::get('twoFactorAuthSecret', '')->data;
|
$secret = Preferences::get('twoFactorAuthSecret', '')->data;
|
||||||
|
|
||||||
if (strlen($secret) === 0) {
|
if (strlen($secret) === 0) {
|
||||||
throw new FireflyException('Your two factor authentication secret is empty, which it should be at this point. Please check the log files.');
|
throw new FireflyException('Your two factor authentication secret is empty, which it cannot be at this point. Please check the log files.');
|
||||||
}
|
}
|
||||||
Session::flash('two-factor-secret', $secret);
|
Session::flash('two-factor-secret', $secret);
|
||||||
|
|
||||||
|
@@ -82,6 +82,7 @@ class ChartBudgetControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
$repository = $this->mock('FireflyIII\Repositories\Budget\BudgetRepositoryInterface');
|
$repository = $this->mock('FireflyIII\Repositories\Budget\BudgetRepositoryInterface');
|
||||||
$repository->shouldReceive('getBudgetsAndExpensesPerMonth')->once()->andReturn([]);
|
$repository->shouldReceive('getBudgetsAndExpensesPerMonth')->once()->andReturn([]);
|
||||||
|
$repository->shouldReceive('getWithoutBudgetSum')->times(12)->andReturn('0');
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$this->call('GET', '/chart/budget/year/default/20150101/20151231/1');
|
$this->call('GET', '/chart/budget/year/default/20150101/20151231/1');
|
||||||
|
@@ -32,7 +32,7 @@ class RuleControllerTest extends TestCase
|
|||||||
public function testDelete()
|
public function testDelete()
|
||||||
{
|
{
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$this->call('GET', '/rules/rules/delete/1');
|
$this->call('GET', '/rules/delete/1');
|
||||||
$this->assertResponseStatus(200);
|
$this->assertResponseStatus(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ class RuleControllerTest extends TestCase
|
|||||||
public function testDown()
|
public function testDown()
|
||||||
{
|
{
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$this->call('GET', '/rules/rules/down/1');
|
$this->call('GET', '/rules/down/1');
|
||||||
$this->assertResponseStatus(302);
|
$this->assertResponseStatus(302);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ class RuleControllerTest extends TestCase
|
|||||||
public function testEdit()
|
public function testEdit()
|
||||||
{
|
{
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$this->call('GET', '/rules/rules/edit/1');
|
$this->call('GET', '/rules/edit/1');
|
||||||
$this->assertResponseStatus(200);
|
$this->assertResponseStatus(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ class RuleControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$args = ['actions' => [1, 2, 3]];
|
$args = ['actions' => [1, 2, 3]];
|
||||||
$this->call('POST', '/rules/rules/action/reorder/1', $args);
|
$this->call('POST', '/rules/action/order/1', $args);
|
||||||
$this->assertResponseStatus(200);
|
$this->assertResponseStatus(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,7 +101,7 @@ class RuleControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$args = ['actions' => [1, 2]];
|
$args = ['actions' => [1, 2]];
|
||||||
$this->call('POST', '/rules/rules/trigger/reorder/1', $args);
|
$this->call('POST', '/rules/trigger/order/1', $args);
|
||||||
$this->assertResponseStatus(200);
|
$this->assertResponseStatus(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@ class RuleControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$this->call('GET', '/rules/rules/up/1');
|
$this->call('GET', '/rules/up/1');
|
||||||
$this->assertResponseStatus(302);
|
$this->assertResponseStatus(302);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@ class RuleGroupControllerTest extends TestCase
|
|||||||
public function testCreate()
|
public function testCreate()
|
||||||
{
|
{
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$this->call('GET', '/rules/groups/create');
|
$this->call('GET', '/rule-groups/create');
|
||||||
$this->assertResponseStatus(200);
|
$this->assertResponseStatus(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ class RuleGroupControllerTest extends TestCase
|
|||||||
public function testDelete()
|
public function testDelete()
|
||||||
{
|
{
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$this->call('GET', '/rules/groups/delete/1');
|
$this->call('GET', '/rule-groups/delete/1');
|
||||||
$this->assertResponseStatus(200);
|
$this->assertResponseStatus(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ class RuleGroupControllerTest extends TestCase
|
|||||||
$this->session(['rules.rule-group.delete.url' => 'http://localhost']);
|
$this->session(['rules.rule-group.delete.url' => 'http://localhost']);
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$this->call('POST', '/rules/groups/destroy/1');
|
$this->call('POST', '/rule-groups/destroy/1');
|
||||||
$this->assertResponseStatus(302);
|
$this->assertResponseStatus(302);
|
||||||
$this->assertSessionHas('success');
|
$this->assertSessionHas('success');
|
||||||
}
|
}
|
||||||
@@ -54,7 +54,7 @@ class RuleGroupControllerTest extends TestCase
|
|||||||
public function testDown()
|
public function testDown()
|
||||||
{
|
{
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$this->call('GET', '/rules/groups/down/1');
|
$this->call('GET', '/rule-groups/down/1');
|
||||||
$this->assertResponseStatus(302);
|
$this->assertResponseStatus(302);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ class RuleGroupControllerTest extends TestCase
|
|||||||
public function testEdit()
|
public function testEdit()
|
||||||
{
|
{
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$this->call('GET', '/rules/groups/edit/1');
|
$this->call('GET', '/rule-groups/edit/1');
|
||||||
$this->assertResponseStatus(200);
|
$this->assertResponseStatus(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ class RuleGroupControllerTest extends TestCase
|
|||||||
];
|
];
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$this->call('POST', '/rules/groups/store', $args);
|
$this->call('POST', '/rule-groups/store', $args);
|
||||||
$this->assertResponseStatus(302);
|
$this->assertResponseStatus(302);
|
||||||
$this->assertSessionHas('success');
|
$this->assertSessionHas('success');
|
||||||
}
|
}
|
||||||
@@ -93,7 +93,7 @@ class RuleGroupControllerTest extends TestCase
|
|||||||
public function testUp()
|
public function testUp()
|
||||||
{
|
{
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$this->call('GET', '/rules/groups/up/1');
|
$this->call('GET', '/rule-groups/up/1');
|
||||||
$this->assertResponseStatus(302);
|
$this->assertResponseStatus(302);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ class RuleGroupControllerTest extends TestCase
|
|||||||
];
|
];
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$this->call('POST', '/rules/groups/update/1', $args);
|
$this->call('POST', '/rule-groups/update/1', $args);
|
||||||
$this->assertResponseStatus(302);
|
$this->assertResponseStatus(302);
|
||||||
$this->assertSessionHas('success');
|
$this->assertSessionHas('success');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user