Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rupertbates committed Jun 5, 2024
1 parent 0f4c032 commit a59435a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions membership-attribute-service/app/models/FeastApp.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ object FeastApp {

object AndroidOfferTags {
// Offer tags are the Android equivalent of iOS subscription groups - used by the app to work out which offer to show to the user
val InitialSupporterLaunchOffer = "initial_supporter_launch_offer"
val ExtendedTrial = "initial_supporter_launch_offer"
}

private def isBeforeFeastLaunch(dt: LocalDate): Boolean = dt.isBefore(FeastIosLaunchDate)
Expand Down Expand Up @@ -49,6 +49,6 @@ object FeastApp {
)
def getFeastAndroidOfferTags(attributes: Attributes): Option[String] =
if (shouldShowSubscriptionOptions(attributes) && shouldGetFreeTrial(attributes))
Some(AndroidOfferTags.InitialSupporterLaunchOffer)
Some(AndroidOfferTags.ExtendedTrial)
else None
}
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ class AttributeControllerTest extends Specification with AfterAll with Idiomatic
| "userId": "$userWithRecurringContributionUserId",
| "showSupportMessaging": false,
| "feastIosSubscriptionGroup": "${FeastApp.IosSubscriptionGroupIds.ExtendedTrial}",
| "feastAndroidOfferTags": "${FeastApp.AndroidOfferTags.ExtendedTrial}",
| "recurringContributionPaymentPlan":"Monthly Contribution",
| "recurringContributionAcquisitionDate":"$dateBeforeFeastLaunch",
| "contentAccess": {
Expand Down Expand Up @@ -454,6 +455,7 @@ class AttributeControllerTest extends Specification with AfterAll with Idiomatic
| "liveAppSubscriptionExpiryDate":"${dateTimeInTheFuture.toLocalDate}",
| "showSupportMessaging": false,
| "feastIosSubscriptionGroup": "${FeastApp.IosSubscriptionGroupIds.ExtendedTrial}",
| "feastAndroidOfferTags": "${FeastApp.AndroidOfferTags.ExtendedTrial}",
| "contentAccess": {
| "member": false,
| "paidMember": false,
Expand Down Expand Up @@ -483,6 +485,7 @@ class AttributeControllerTest extends Specification with AfterAll with Idiomatic
| "userId": "$userWithNewspaperUserId",
| "paperSubscriptionExpiryDate":"${dateTimeInTheFuture.toLocalDate}",
| "feastIosSubscriptionGroup": "${FeastApp.IosSubscriptionGroupIds.ExtendedTrial}",
| "feastAndroidOfferTags": "${FeastApp.AndroidOfferTags.ExtendedTrial}",
| "showSupportMessaging": false,
| "contentAccess": {
| "member": false,
Expand Down Expand Up @@ -544,6 +547,7 @@ class AttributeControllerTest extends Specification with AfterAll with Idiomatic
| "guardianWeeklyExpiryDate":"${dateTimeInTheFuture.toLocalDate}",
| "showSupportMessaging": false,
| "feastIosSubscriptionGroup": "${FeastApp.IosSubscriptionGroupIds.ExtendedTrial}",
| "feastAndroidOfferTags": "${FeastApp.AndroidOfferTags.ExtendedTrial}",
| "contentAccess": {
| "member": false,
| "paidMember": false,
Expand Down

0 comments on commit a59435a

Please sign in to comment.