Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Commit a04837a

Browse files
authored
Merge pull request #3086 from wordpress-mobile/issue/12390-update-models-to-support-evergreen-campaigns
Add new isEndless field to support Blaze Evergreen campaigns
2 parents 651ba46 + 4ee8985 commit a04837a

File tree

11 files changed

+987
-15
lines changed

11 files changed

+987
-15
lines changed

example/src/test/java/org/wordpress/android/fluxc/network/rest/wpcom/blaze/BlazeCampaignsRestClientTest.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ class BlazeCampaignsRestClientTest {
209209
durationDays = DURATION_IN_DAYS,
210210
startTime = CREATED_AT,
211211
targetUrn = "urn:wpcom:post:199247490:9",
212-
status = UI_STATUS
212+
status = UI_STATUS,
213+
isEvergreen = false
213214
)
214215

215216
val BLAZE_CAMPAIGNS_RESPONSE = BlazeCampaignListResponse(

example/src/test/java/org/wordpress/android/fluxc/persistence/BlazeCampaignsDaoTest.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ class BlazeCampaignsDaoTest {
177177
targetUrn = TARGET_URN,
178178
totalBudget = TOTAL_BUDGET,
179179
spentBudget = SPENT_BUDGET,
180+
isEndlessCampaign = false
180181
)
181182
val BLAZE_CAMPAIGNS_MODEL = BlazeCampaignsModel(
182183
campaigns = listOf(BLAZE_CAMPAIGN_MODEL),

example/src/test/java/org/wordpress/android/fluxc/store/blaze/BlazeCampaignsStoreTest.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ private val CAMPAIGN_RESPONSE = BlazeCampaign(
8585
durationDays = DURATION_IN_DAYS,
8686
startTime = CREATED_AT,
8787
targetUrn = TARGET_URN,
88-
status = UI_STATUS
88+
status = UI_STATUS,
89+
isEvergreen = false
8990
)
9091

9192
private val BLAZE_CAMPAIGNS_RESPONSE = BlazeCampaignListResponse(
@@ -106,7 +107,8 @@ private val BLAZE_CAMPAIGN_ENTITY = BlazeCampaignEntity(
106107
clicks = CLICKS,
107108
targetUrn = TARGET_URN,
108109
totalBudget = TOTAL_BUDGET,
109-
spentBudget = SPENT_BUDGET
110+
spentBudget = SPENT_BUDGET,
111+
isEndlessCampaign = false
110112
)
111113
private val BLAZE_CAMPAIGNS_MODEL = BlazeCampaignsModel(
112114
campaigns = listOf(BLAZE_CAMPAIGN_ENTITY.toDomainModel()),
@@ -458,6 +460,7 @@ class BlazeCampaignsStoreTest {
458460
targetUrn = TARGET_URN,
459461
totalBudget = TOTAL_BUDGET,
460462
spentBudget = SPENT_BUDGET,
463+
isEndlessCampaign = false
461464
)
462465

463466
whenever(creationRestClient.createCampaign(any(), any())).thenReturn(

0 commit comments

Comments
 (0)