mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-09 20:11:22 +00:00
Built chart tests.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use League\FactoryMuffin\Facade as FactoryMuffin;
|
||||
|
||||
/**
|
||||
* Class ChartPiggyBankControllerTest
|
||||
*/
|
||||
@@ -25,6 +27,24 @@ class ChartPiggyBankControllerTest extends TestCase
|
||||
|
||||
public function testHistory()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
$piggy = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
$this->be($piggy->account->user);
|
||||
|
||||
// data:
|
||||
$obj = new stdClass;
|
||||
$obj->sum = 100;
|
||||
$obj->date = '2015-01-01';
|
||||
$set = [
|
||||
$obj
|
||||
];
|
||||
|
||||
// mock!
|
||||
$repository = $this->mock('FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface');
|
||||
|
||||
// fake!
|
||||
$repository->shouldReceive('getEventSummarySet')->andReturn($set);
|
||||
|
||||
$this->call('GET', '/chart/piggyBank/' . $piggy->id);
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user