Skip to content

Commit

Permalink
Fix lineitem test and add extra checks to convert to invoice test
Browse files Browse the repository at this point in the history
  • Loading branch information
mlewis-everley committed Mar 5, 2024
1 parent a511899 commit a82f884
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions tests/EstimateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@ class EstimateTest extends SapphireTest
public function testConvertToInvoice()
{
$estimate = $this->objFromFixture(Estimate::class, 'addressdetails_uk');
$ref = $estimate->Ref;
$fullref = $estimate->FullRef;
$invoice = $estimate->convertToInvoice();

$this->assertTrue($invoice instanceof Invoice);
$this->assertNotEquals($ref, $invoice->Ref);
$this->assertNotEquals($fullref, $invoice->FullRef);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/LineItemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public function testFindStockItem()
$this->assertEqualsWithDelta(1, $versioned_product->Version, 0.01);
$this->assertEqualsWithDelta(4.99, $versioned_product->NoTaxPrice, 0.001);
$this->assertEqualsWithDelta(4.99, $line_item->NoTaxPrice, 0.001);
$this->assertEqualsWithDelta(5.99, $product->NoTaxPrice, 0.001);
$this->assertEqualsWithDelta(6.99, $product->NoTaxPrice, 0.001);
}

/**
Expand Down

0 comments on commit a82f884

Please sign in to comment.