Skip to content

Commit

Permalink
Merge pull request #2888 from wordpress-mobile/feature/10058-add-new-…
Browse files Browse the repository at this point in the history
…blaze-campaign-field

Adds new field target_urn to BlazeCampaign response model
  • Loading branch information
0nko authored Nov 3, 2023
2 parents 3dc2212 + 3d0e98d commit bf74da4
Show file tree
Hide file tree
Showing 8 changed files with 911 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import org.wordpress.android.fluxc.network.rest.wpcom.WPComGsonRequestBuilder.Re
import org.wordpress.android.fluxc.network.rest.wpcom.auth.AccessToken
import org.wordpress.android.fluxc.test
import kotlin.test.assertEquals
import org.wordpress.android.fluxc.network.rest.wpcom.blaze.BlazeCampaignsFetchedPayload as BlazeCampaignsFetchedPayload

private val CONTENT_CONFIG_RESPONSE = ContentConfig(
title = "Brand new post - do not approve",
Expand All @@ -52,7 +51,8 @@ private val CAMPAIGN_RESPONSE = Campaign(
contentImage = "undefined",
uiStatus = "rejected",
contentConfig = CONTENT_CONFIG_RESPONSE,
campaignStats = CONTENT_CAMPAIGN_STATS
campaignStats = CONTENT_CAMPAIGN_STATS,
targetUrn = "urn:wpcom:post:199247490:9"
)

private val BLAZE_CAMPAIGNS_RESPONSE = BlazeCampaignsResponse(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ private val BLAZE_CAMPAIGN_MODEL = BlazeCampaignModel(
uiStatus = UI_STATUS,
budgetCents = BUDGET_CENTS,
impressions = IMPRESSIONS,
clicks = CLICKS
clicks = CLICKS,
targetUrn = "urn:wpcom:post:199247490:9"
)
private val BLAZE_CAMPAIGNS_MODEL = BlazeCampaignsModel(
campaigns = listOf(BLAZE_CAMPAIGN_MODEL),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ private val CAMPAIGN_RESPONSE = Campaign(
budgetCents = BUDGET_CENTS,
uiStatus = UI_STATUS,
contentConfig = CONTENT_CONFIG_RESPONSE,
campaignStats = CONTENT_CAMPAIGN_STATS
campaignStats = CONTENT_CAMPAIGN_STATS,
targetUrn = "urn:wpcom:post:199247490:9"
)

private val BLAZE_CAMPAIGNS_RESPONSE = BlazeCampaignsResponse(
Expand All @@ -83,7 +84,8 @@ private val BLAZE_CAMPAIGN_MODEL = BlazeCampaignEntity(
uiStatus = UI_STATUS,
budgetCents = BUDGET_CENTS,
impressions = IMPRESSIONS,
clicks = CLICKS
clicks = CLICKS,
targetUrn = "urn:wpcom:post:199247490:9"
)
private val BLAZE_CAMPAIGNS_MODEL = BlazeCampaignsModel(
campaigns = listOf(BLAZE_CAMPAIGN_MODEL.toDomainModel()),
Expand Down
Loading

0 comments on commit bf74da4

Please sign in to comment.