Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rupertbates committed Jun 14, 2024
1 parent 8762f0b commit e73ac2c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class CatReadsTest extends AnyFlatSpec {
pricing = PricingSummary(
Map(
GBP -> Price(74.4f, GBP),
USD -> Price(90f, USD),
USD -> Price(99f, USD),
),
),
billingPeriod = Some(ZQuarter),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ class CatalogServiceTest extends Specification {
val cats = CatalogService.read(FetchCatalog.fromZuoraApi(CatalogServiceTest.client("rest/Catalog.json")))
val supporterPlus = cats(ProductRatePlanId("8ad08e1a8586721801858805663f6fab"))
val supporterPlusMonth = cats(ProductRatePlanId("8ad08cbd8586721c01858804e3275376"))
val supporterPluses = cats.collect { case (_, plan) if plan.productId == ids.supporterPlus && plan.status == Status.Legacy => }.toList
supporterPluses.size must beEqualTo(2)
supporterPlus.charges.head.billingPeriod must beEqualTo(Some(ZYear))
supporterPlusMonth.charges.head.billingPeriod must beEqualTo(Some(ZMonth))
supporterPlus.charges.head.billingPeriod must beSome(ZYear)
supporterPlusMonth.charges.head.billingPeriod must beSome(ZMonth)

val tierThree = cats.collect { case (_, plan) if plan.productId == ids.tierThree && plan.status == Status.Current => plan}.toList
tierThree.size must beEqualTo(4)
}
}
}
Expand Down

0 comments on commit e73ac2c

Please sign in to comment.