mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-16 22:58:09 +00:00
This should fix the tests on the translations branch.
This commit is contained in:
@@ -141,11 +141,19 @@ class BudgetControllerTest extends TestCase
|
||||
|
||||
public function testPostUpdateIncome()
|
||||
{
|
||||
|
||||
|
||||
$budget = FactoryMuffin::create('FireflyIII\Models\Budget');
|
||||
$this->be($budget->user);
|
||||
$date = Carbon::now()->startOfMonth()->format('FY');
|
||||
Preferences::shouldReceive('set')->once()->withArgs(['budgetIncomeTotal' . $date, 1001]);
|
||||
|
||||
// language preference:
|
||||
$language = FactoryMuffin::create('FireflyIII\Models\Preference');
|
||||
$language->data = 'en';
|
||||
$language->save();
|
||||
Preferences::shouldReceive('get')->withAnyArgs()->andReturn($language);
|
||||
|
||||
$this->call('POST', '/budgets/income', ['_token' => 'replaceme', 'amount' => 1001]);
|
||||
$this->assertResponseStatus(302);
|
||||
$this->assertRedirectedToRoute('budgets.index');
|
||||
@@ -311,6 +319,12 @@ class BudgetControllerTest extends TestCase
|
||||
Amount::shouldReceive('getCurrencyCode')->andReturn('X');
|
||||
Amount::shouldReceive('getCurrencySymbol')->andReturn('X');
|
||||
|
||||
// language preference:
|
||||
$language = FactoryMuffin::create('FireflyIII\Models\Preference');
|
||||
$language->data = 'en';
|
||||
$language->save();
|
||||
Preferences::shouldReceive('get')->withAnyArgs()->andReturn($language);
|
||||
|
||||
|
||||
$this->call('GET', '/budgets/income');
|
||||
$this->assertResponseOk();
|
||||
|
||||
Reference in New Issue
Block a user