mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-01 11:31:06 +00:00
Various code cleanup.
This commit is contained in:
@@ -283,4 +283,4 @@ class ReconcileControllerTest extends TestCase
|
||||
$response->assertSessionHas('error');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,8 @@ class HomeControllerTest extends TestCase
|
||||
$response->assertSee('<ol class="breadcrumb">');
|
||||
}
|
||||
|
||||
public function testTestMessage() {
|
||||
public function testTestMessage()
|
||||
{
|
||||
Event::fake();
|
||||
|
||||
$this->be($this->user());
|
||||
|
||||
@@ -44,20 +44,6 @@ use Tests\TestCase;
|
||||
class BudgetControllerTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\BudgetController::infoIncome
|
||||
*/
|
||||
public function testInfoIncome() {
|
||||
// mock stuff
|
||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||
$repository->shouldReceive('getAvailableBudget')->andReturn('100.123');
|
||||
|
||||
$data = ['amount' => 200, 'start' => '2017-01-01', 'end' => '2017-01-31'];
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('budgets.income.info', ['20170101','20170131']), $data);
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\BudgetController::amount
|
||||
*/
|
||||
@@ -299,6 +285,21 @@ class BudgetControllerTest extends TestCase
|
||||
$response->assertSee('<ol class="breadcrumb">');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\BudgetController::infoIncome
|
||||
*/
|
||||
public function testInfoIncome()
|
||||
{
|
||||
// mock stuff
|
||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||
$repository->shouldReceive('getAvailableBudget')->andReturn('100.123');
|
||||
|
||||
$data = ['amount' => 200, 'start' => '2017-01-01', 'end' => '2017-01-31'];
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('budgets.income.info', ['20170101', '20170131']), $data);
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\BudgetController::noBudget
|
||||
* @covers \FireflyIII\Http\Controllers\BudgetController::getPeriodOverview
|
||||
|
||||
@@ -57,10 +57,10 @@ class ExpenseReportControllerTest extends TestCase
|
||||
$accountRepository = $this->mock(AccountRepositoryInterface::class);
|
||||
$accountRepository->shouldReceive('findByName')->once()->andReturn($expense);
|
||||
|
||||
$set = new Collection;
|
||||
$transaction = new Transaction();
|
||||
$set = new Collection;
|
||||
$transaction = new Transaction();
|
||||
$transaction->opposing_account_name = 'Somebody';
|
||||
$transaction->transaction_amount = '5';
|
||||
$transaction->transaction_amount = '5';
|
||||
$set->push($transaction);
|
||||
$collector->shouldReceive('setAccounts')->andReturnSelf();
|
||||
$collector->shouldReceive('setRange')->andReturnSelf();
|
||||
|
||||
@@ -340,7 +340,7 @@ class ProfileControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\ProfileController::undoEmailChange()
|
||||
* @covers \FireflyIII\Http\Controllers\ProfileController::undoEmailChange()
|
||||
* @expectedExceptionMessage Invalid token
|
||||
*/
|
||||
public function testUndoEmailChangeBadHash()
|
||||
@@ -364,7 +364,7 @@ class ProfileControllerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\ProfileController::undoEmailChange()
|
||||
* @covers \FireflyIII\Http\Controllers\ProfileController::undoEmailChange()
|
||||
* @expectedExceptionMessage Invalid token
|
||||
*/
|
||||
public function testUndoEmailChangeBadToken()
|
||||
|
||||
Reference in New Issue
Block a user