diff --git a/tests/repositories/BillRepositoryTest.php b/tests/repositories/BillRepositoryTest.php index 882bdac903..c900499a20 100644 --- a/tests/repositories/BillRepositoryTest.php +++ b/tests/repositories/BillRepositoryTest.php @@ -1,5 +1,8 @@ markTestIncomplete( - 'This test has not been implemented yet.' - ); + $description = 'Fake bill ' . rand(10, 100); + $date = new Carbon('2013-01-01'); + $amount = 1200; + $bill = $this->object->createFakeBill($description, $date, $amount); + + $this->assertEquals($amount, $bill->amount_max); + $this->assertEquals($amount, $bill->amount_min); + $this->assertNull($bill->id); + $this->assertEquals($description, $bill->name); + } /** * @covers FireflyIII\Repositories\Bill\BillRepository::destroy - * @todo Implement testDestroy(). */ public function testDestroy() { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); + $bill = FactoryMuffin::create('FireflyIII\Models\Bill'); + $id = $bill->id; + $this->object->destroy($bill); + + // cannot find bill: + $this->assertCount(0, Bill::whereId($id)->whereNotNull('deleted_at')->get()); } /**