Skip to content

Firefly III: a personal finances manager

Should fix the tests

James Cole70c8a524cdd1
diff --git a/app/Http/Controllers/Auth/TwoFactorController.php b/app/Http/Controllers/Auth/TwoFactorController.php
index 99b64899cf..4402039d96 100644
--- a/app/Http/Controllers/Auth/TwoFactorController.php
+++ b/app/Http/Controllers/Auth/TwoFactorController.php
@@ -38,7 +38,7 @@ class TwoFactorController extends Controller
$secret = Preferences::get('twoFactorAuthSecret', '')->data;
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);
diff --git a/tests/acceptance/Controllers/Chart/ChartBudgetControllerTest.php b/tests/acceptance/Controllers/Chart/ChartBudgetControllerTest.php
index c5f05623ab..47d6ef4b67 100644
--- a/tests/acceptance/Controllers/Chart/ChartBudgetControllerTest.php
+++ b/tests/acceptance/Controllers/Chart/ChartBudgetControllerTest.php
@@ -82,6 +82,7 @@ class ChartBudgetControllerTest extends TestCase
{
$repository = $this->mock('FireflyIII\Repositories\Budget\BudgetRepositoryInterface');
$repository->shouldReceive('getBudgetsAndExpensesPerMonth')->once()->andReturn([]);
+ $repository->shouldReceive('getWithoutBudgetSum')->times(12)->andReturn('0');
$this->be($this->user());
$this->call('GET', '/chart/budget/year/default/20150101/20151231/1');
diff --git a/tests/acceptance/Controllers/RuleControllerTest.php b/tests/acceptance/Controllers/RuleControllerTest.php
index ab8ed0a935..6719575ff7 100644
--- a/tests/acceptance/Controllers/RuleControllerTest.php
+++ b/tests/acceptance/Controllers/RuleControllerTest.php
@@ -32,7 +32,7 @@ class RuleControllerTest extends TestCase
public function testDelete()
{
$this->be($this->user());
- $this->call('GET', '/rules/rules/delete/1');
+ $this->call('GET', '/rules/delete/1');
$this->assertResponseStatus(200);
}
@@ -55,7 +55,7 @@ class RuleControllerTest extends TestCase
public function testDown()
{
$this->be($this->user());
- $this->call('GET', '/rules/rules/down/1');
+ $this->call('GET', '/rules/down/1');
$this->assertResponseStatus(302);
}
@@ -67,7 +67,7 @@ class RuleControllerTest extends TestCase
public function testEdit()
{
$this->be($this->user());
- $this->call('GET', '/rules/rules/edit/1');
+ $this->call('GET', '/rules/edit/1');
$this->assertResponseStatus(200);
}
@@ -90,7 +90,7 @@ class RuleControllerTest extends TestCase
{
$this->be($this->user());
$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);
}
@@ -101,7 +101,7 @@ class RuleControllerTest extends TestCase
{
$this->be($this->user());
$args = ['actions' => [1, 2]];
- $this->call('POST', '/rules/rules/trigger/reorder/1', $args);
+ $this->call('POST', '/rules/trigger/order/1', $args);
$this->assertResponseStatus(200);
}
@@ -141,7 +141,7 @@ class RuleControllerTest extends TestCase
{
$this->be($this->user());
- $this->call('GET', '/rules/rules/up/1');
+ $this->call('GET', '/rules/up/1');
$this->assertResponseStatus(302);
}
diff --git a/tests/acceptance/Controllers/RuleGroupControllerTest.php b/tests/acceptance/Controllers/RuleGroupControllerTest.php
index 838b110815..a41fd5c50e 100644
--- a/tests/acceptance/Controllers/RuleGroupControllerTest.php
+++ b/tests/acceptance/Controllers/RuleGroupControllerTest.php
@@ -21,7 +21,7 @@ class RuleGroupControllerTest extends TestCase
public function testCreate()
{
$this->be($this->user());
- $this->call('GET', '/rules/groups/create');
+ $this->call('GET', '/rule-groups/create');
$this->assertResponseStatus(200);
}
@@ -31,7 +31,7 @@ class RuleGroupControllerTest extends TestCase
public function testDelete()
{
$this->be($this->user());
- $this->call('GET', '/rules/groups/delete/1');
+ $this->call('GET', '/rule-groups/delete/1');
$this->assertResponseStatus(200);
}
@@ -43,7 +43,7 @@ class RuleGroupControllerTest extends TestCase
$this->session(['rules.rule-group.delete.url' => 'http://localhost']);
$this->be($this->user());
- $this->call('POST', '/rules/groups/destroy/1');
+ $this->call('POST', '/rule-groups/destroy/1');
$this->assertResponseStatus(302);
$this->assertSessionHas('success');
}
@@ -54,7 +54,7 @@ class RuleGroupControllerTest extends TestCase
public function testDown()
{
$this->be($this->user());
- $this->call('GET', '/rules/groups/down/1');
+ $this->call('GET', '/rule-groups/down/1');
$this->assertResponseStatus(302);
}
@@ -64,7 +64,7 @@ class RuleGroupControllerTest extends TestCase
public function testEdit()
{
$this->be($this->user());
- $this->call('GET', '/rules/groups/edit/1');
+ $this->call('GET', '/rule-groups/edit/1');
$this->assertResponseStatus(200);
}
@@ -82,7 +82,7 @@ class RuleGroupControllerTest extends TestCase
];
$this->be($this->user());
- $this->call('POST', '/rules/groups/store', $args);
+ $this->call('POST', '/rule-groups/store', $args);
$this->assertResponseStatus(302);
$this->assertSessionHas('success');
}
@@ -93,7 +93,7 @@ class RuleGroupControllerTest extends TestCase
public function testUp()
{
$this->be($this->user());
- $this->call('GET', '/rules/groups/up/1');
+ $this->call('GET', '/rule-groups/up/1');
$this->assertResponseStatus(302);
}
@@ -113,7 +113,7 @@ class RuleGroupControllerTest extends TestCase
];
$this->be($this->user());
- $this->call('POST', '/rules/groups/update/1', $args);
+ $this->call('POST', '/rule-groups/update/1', $args);
$this->assertResponseStatus(302);
$this->assertSessionHas('success');
}