mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-07 14:41:20 +00:00
Fixed tests
This commit is contained in:
@@ -212,7 +212,7 @@ class GoogleChartControllerTest extends TestCase
|
||||
// mock!
|
||||
$repository = $this->mock('FireflyIII\Repositories\Category\CategoryRepositoryInterface');
|
||||
$repository->shouldReceive('getFirstActivityDate')->andReturn($start);
|
||||
$repository->shouldReceive('spentInPeriodSum')->andReturn(rand(1, 100));
|
||||
$repository->shouldReceive('spentInPeriod')->andReturn(rand(1, 100));
|
||||
Preferences::shouldReceive('get')->andReturn($pref);
|
||||
|
||||
Navigation::shouldReceive('startOfPeriod')->andReturn($start);
|
||||
|
||||
@@ -292,11 +292,11 @@ class BudgetRepositoryTest extends TestCase
|
||||
/**
|
||||
* @covers FireflyIII\Repositories\Budget\BudgetRepository::spentInMonth
|
||||
*/
|
||||
public function testSpentInMonth()
|
||||
public function testSpentInPeriod()
|
||||
{
|
||||
$budget = FactoryMuffin::create('FireflyIII\Models\Budget');
|
||||
|
||||
$amount = $this->object->spentInMonth($budget, new Carbon);
|
||||
$amount = $this->object->spentInPeriod($budget, new Carbon, new Carbon);
|
||||
$this->assertEquals(0, $amount);
|
||||
}
|
||||
|
||||
|
||||
@@ -189,12 +189,12 @@ class CategoryRepositoryTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Repositories\Category\CategoryRepository::spentInPeriodSum
|
||||
* @covers FireflyIII\Repositories\Category\CategoryRepository::spentInPeriod
|
||||
*/
|
||||
public function testSpentInPeriodSum()
|
||||
{
|
||||
$category = FactoryMuffin::create('FireflyIII\Models\Category');
|
||||
$sum = $this->object->spentInPeriodSum($category, new Carbon, new Carbon);
|
||||
$sum = $this->object->spentInPeriod($category, new Carbon, new Carbon);
|
||||
|
||||
$this->assertEquals(0, $sum);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user