Skip to content

Commit 0c04a41

Browse files
committed
Add assertion to check that the fragment is also correctly written
1 parent d173e6d commit 0c04a41

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apollo-integration/src/test/java/com/apollographql/apollo/FragmentOverwritesTest.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ class FragmentOverwritesTest {
6262
val networkResponse = apolloClient.query(HomeQuery()).await()
6363

6464
assertThat(networkResponse.data?.home?.sectionA?.name).isEqualTo("initialSectionName")
65+
assertThat(networkResponse.data?.home?.fragments?.sectionFragment?.sectionA?.imageUrl).isEqualTo("initialUrl")
6566

6667
apolloClient.apolloStore.writeAndPublish(
6768
HomeQuery(),
@@ -89,6 +90,7 @@ class FragmentOverwritesTest {
8990
.await()
9091

9192
assertThat(cacheResponse.data?.home?.sectionA?.name).isEqualTo("modifiedSectionName")
93+
assertThat(cacheResponse.data?.home?.fragments?.sectionFragment?.sectionA?.imageUrl).isEqualTo("modifiedUrl")
9294
}
9395
}
9496
}

0 commit comments

Comments
 (0)