Skip to content

Commit 855922c

Browse files
committed
Account for null in tetss (vs 0)
Signed-off-by: snipe <[email protected]>
1 parent bc645d2 commit 855922c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/Unit/SnipeModelTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ public function testSetsPurchaseDatesAppropriately()
1818
public function testSetsPurchaseCostsAppropriately()
1919
{
2020
$c = new SnipeModel;
21+
$c->purchase_cost = '';
22+
$this->assertTrue($c->purchase_cost == null);
2123
$c->purchase_cost = '0.00';
22-
$this->assertTrue($c->purchase_cost === null);
24+
$this->assertTrue($c->purchase_cost == 0.00);
2325
$c->purchase_cost = '9.54';
24-
$this->assertTrue($c->purchase_cost === 9.54);
26+
$this->assertTrue($c->purchase_cost == 9.54);
2527
$c->purchase_cost = '9.50';
26-
$this->assertTrue($c->purchase_cost === 9.5);
28+
$this->assertTrue($c->purchase_cost == 9.5);
2729
}
2830

2931
public function testNullsBlankLocationIdsButNotOthers()

0 commit comments

Comments
 (0)