@@ -49,16 +49,16 @@ void main() {
4949 test ('toJson returns correct JSON map' , () {
5050 final json = openInternalContent.toJson ();
5151 expect (json, < String , dynamic > {
52- 'contentId ' : contentId,
53- 'contentType ' : contentType.name,
52+ 'content_id ' : contentId,
53+ 'content_type ' : contentType.name,
5454 'type' : 'open_internal_content' ,
5555 });
5656 });
5757
5858 test ('fromJson returns correct OpenInternalContent object' , () {
5959 final json = < String , dynamic > {
60- 'contentId ' : contentId,
61- 'contentType ' : contentType.name,
60+ 'content_id ' : contentId,
61+ 'content_type ' : contentType.name,
6262 'type' : 'open_internal_content' ,
6363 };
6464 final fromJsonResult = OpenInternalContent .fromJson (json);
@@ -112,8 +112,8 @@ void main() {
112112 test ('toJson returns correct JSON map' , () {
113113 final json = showInterstitialThenOpenInternalContent.toJson ();
114114 expect (json, < String , dynamic > {
115- 'contentId ' : contentId,
116- 'contentType ' : contentType.name,
115+ 'content_id ' : contentId,
116+ 'content_type ' : contentType.name,
117117 'type' : 'show_interstitial_then_open_internal_content' ,
118118 });
119119 });
@@ -122,8 +122,8 @@ void main() {
122122 'fromJson returns correct ShowInterstitialThenOpenInternalContent '
123123 'object' , () {
124124 final json = < String , dynamic > {
125- 'contentId ' : contentId,
126- 'contentType ' : contentType.name,
125+ 'content_id ' : contentId,
126+ 'content_type ' : contentType.name,
127127 'type' : 'show_interstitial_then_open_internal_content' ,
128128 };
129129 final fromJsonResult =
@@ -168,8 +168,8 @@ void main() {
168168 group ('feedItemActionFromJson' , () {
169169 test ('dispatches to OpenInternalContent' , () {
170170 final json = < String , dynamic > {
171- 'contentId ' : 'id1' ,
172- 'contentType ' : 'headline' ,
171+ 'content_id ' : 'id1' ,
172+ 'content_type ' : 'headline' ,
173173 'type' : 'open_internal_content' ,
174174 };
175175 final action = feedItemActionFromJson (json);
@@ -180,8 +180,8 @@ void main() {
180180
181181 test ('dispatches to ShowInterstitialThenOpenInternalContent' , () {
182182 final json = < String , dynamic > {
183- 'contentId ' : 'id2' ,
184- 'contentType ' : 'category' ,
183+ 'content_id ' : 'id2' ,
184+ 'content_type ' : 'category' ,
185185 'type' : 'show_interstitial_then_open_internal_content' ,
186186 };
187187 final action = feedItemActionFromJson (json);
@@ -204,7 +204,7 @@ void main() {
204204 });
205205
206206 test ('throws FormatException if type is missing' , () {
207- final json = < String , dynamic > {'contentId ' : 'id1' };
207+ final json = < String , dynamic > {'content_id ' : 'id1' };
208208 expect (
209209 () => feedItemActionFromJson (json),
210210 throwsA (
@@ -240,8 +240,8 @@ void main() {
240240 );
241241 final json = feedItemActionToJson (action);
242242 expect (json, < String , dynamic > {
243- 'contentId ' : 'id1' ,
244- 'contentType ' : 'headline' ,
243+ 'content_id ' : 'id1' ,
244+ 'content_type ' : 'headline' ,
245245 'type' : 'open_internal_content' ,
246246 });
247247 });
@@ -253,8 +253,8 @@ void main() {
253253 );
254254 final json = feedItemActionToJson (action);
255255 expect (json, < String , dynamic > {
256- 'contentId ' : 'id2' ,
257- 'contentType ' : 'category' ,
256+ 'content_id ' : 'id2' ,
257+ 'content_type ' : 'category' ,
258258 'type' : 'show_interstitial_then_open_internal_content' ,
259259 });
260260 });
0 commit comments