File tree 1 file changed +4
-4
lines changed
parsely/src/test/java/com/parsely/parselyandroid
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ class ParselyMetadataTest {
10
10
@Test
11
11
fun `given metadata with complete set of data, when converting to map, then the map is as expected` () {
12
12
// given
13
+ val pageType = " post"
13
14
val sut = ParselyMetadata (
14
15
authors,
15
16
link,
@@ -25,7 +26,8 @@ class ParselyMetadataTest {
25
26
val map = sut.toMap()
26
27
27
28
// then
28
- assertThat(map).isEqualTo(expectedParselyMetadataMap)
29
+ val expectedMapWithPageType = expectedBaseParselyMetadataMap + (" page_type" to pageType)
30
+ assertThat(map).isEqualTo(expectedMapWithPageType)
29
31
}
30
32
31
33
@Test
@@ -58,7 +60,6 @@ class ParselyMetadataTest {
58
60
val thumbUrl = " sample thumb url"
59
61
val title = " sample title"
60
62
val pubDate = Calendar .getInstance().apply { set(2023 , 0 , 1 ) }
61
- val pageType = " post"
62
63
63
64
val expectedParselyMetadataMap = mapOf (
64
65
" authors" to authors,
@@ -67,8 +68,7 @@ class ParselyMetadataTest {
67
68
" tags" to tags,
68
69
" thumb_url" to thumbUrl,
69
70
" title" to title,
70
- " pub_date_tmsp" to pubDate.timeInMillis / 1000 ,
71
- " page_type" to pageType
71
+ " pub_date_tmsp" to pubDate.timeInMillis / 1000
72
72
)
73
73
}
74
74
}
You can’t perform that action at this time.
0 commit comments