Skip to content

Commit 1adfb44

Browse files
committed
Actually fix the tests for real this time
1 parent d981f2e commit 1adfb44

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

parsely/src/test/java/com/parsely/parselyandroid/ParselyMetadataTest.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class ParselyMetadataTest {
1010
@Test
1111
fun `given metadata with complete set of data, when converting to map, then the map is as expected`() {
1212
// given
13+
val pageType = "post"
1314
val sut = ParselyMetadata(
1415
authors,
1516
link,
@@ -25,7 +26,8 @@ class ParselyMetadataTest {
2526
val map = sut.toMap()
2627

2728
// then
28-
assertThat(map).isEqualTo(expectedParselyMetadataMap)
29+
val expectedMapWithPageType = expectedBaseParselyMetadataMap + ("page_type" to pageType)
30+
assertThat(map).isEqualTo(expectedMapWithPageType)
2931
}
3032

3133
@Test
@@ -58,7 +60,6 @@ class ParselyMetadataTest {
5860
val thumbUrl = "sample thumb url"
5961
val title = "sample title"
6062
val pubDate = Calendar.getInstance().apply { set(2023, 0, 1) }
61-
val pageType = "post"
6263

6364
val expectedParselyMetadataMap = mapOf(
6465
"authors" to authors,
@@ -67,8 +68,7 @@ class ParselyMetadataTest {
6768
"tags" to tags,
6869
"thumb_url" to thumbUrl,
6970
"title" to title,
70-
"pub_date_tmsp" to pubDate.timeInMillis / 1000,
71-
"page_type" to pageType
71+
"pub_date_tmsp" to pubDate.timeInMillis / 1000
7272
)
7373
}
7474
}

0 commit comments

Comments
 (0)