summaryrefslogtreecommitdiff
path: root/tests/units
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-09-13 16:56:51 -0400
committerFrederic Guillot <fred@kanboard.net>2015-09-13 16:56:51 -0400
commit4b6672d0b33563ab8888d592ef86616ca9238007 (patch)
tree0ba5c0b2244f08ddac55169161271ca2a25ce005 /tests/units
parentd400f7c5be4b3f7371dce73510e5fd4a54375025 (diff)
Move budget outside of the core
The budget planning feature is now a plugin See: https://github.com/kanboard/plugin-budget
Diffstat (limited to 'tests/units')
-rw-r--r--tests/units/Model/HourlyRateTest.php43
1 files changed, 0 insertions, 43 deletions
diff --git a/tests/units/Model/HourlyRateTest.php b/tests/units/Model/HourlyRateTest.php
deleted file mode 100644
index ffc0d87e..00000000
--- a/tests/units/Model/HourlyRateTest.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-
-require_once __DIR__.'/../Base.php';
-
-use Model\User;
-use Model\HourlyRate;
-
-class HourlyRateTest extends Base
-{
- public function testCreation()
- {
- $hr = new HourlyRate($this->container);
- $this->assertEquals(1, $hr->create(1, 32.4, 'EUR', '2015-01-01'));
- $this->assertEquals(2, $hr->create(1, 42, 'CAD', '2015-02-01'));
-
- $rates = $hr->getAllByUser(0);
- $this->assertEmpty($rates);
-
- $rates = $hr->getAllByUser(1);
- $this->assertNotEmpty($rates);
- $this->assertCount(2, $rates);
-
- $this->assertEquals(42, $rates[0]['rate']);
- $this->assertEquals('CAD', $rates[0]['currency']);
- $this->assertEquals('2015-02-01', date('Y-m-d', $rates[0]['date_effective']));
-
- $this->assertEquals(32.4, $rates[1]['rate']);
- $this->assertEquals('EUR', $rates[1]['currency']);
- $this->assertEquals('2015-01-01', date('Y-m-d', $rates[1]['date_effective']));
-
- $this->assertEquals(0, $hr->getCurrentRate(0));
- $this->assertEquals(42, $hr->getCurrentRate(1));
-
- $this->assertTrue($hr->remove(2));
- $this->assertEquals(32.4, $hr->getCurrentRate(1));
-
- $this->assertTrue($hr->remove(1));
- $this->assertEquals(0, $hr->getCurrentRate(1));
-
- $rates = $hr->getAllByUser(1);
- $this->assertEmpty($rates);
- }
-}