Skip to content

Commit

Permalink
Add boundary tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvin-chappell committed Oct 4, 2019
1 parent a954ce7 commit 7092a0a
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,20 @@ class StoppedProductTest extends FlatSpec with Matchers with TypeCheckedTripleEq
expectedInvoiceDate = "2020-06-26"
)
}

it should "be first day of current billing period when stopped publication date is first day of a billing period" in {
testInvoiceDate(
resource = "GuardianWeeklyWith6For6.json",
stoppedPublicationDate = "2020-05-15",
expectedInvoiceDate = "2020-08-15"
)
}

it should "be first day of next billing period when stopped publication date is last day of a billing period" in {
testInvoiceDate(
resource = "GuardianWeeklyWith6For6.json",
stoppedPublicationDate = "2020-08-14",
expectedInvoiceDate = "2020-08-15"
)
}
}

0 comments on commit 7092a0a

Please sign in to comment.