X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fnotify%2FListNotificationTest.kt;h=4c820359e5bda04326ad0dfddae736f77da4f8cd;hb=80a85fb800467a7041517ed1901b59d8a3f2cccd;hp=0c815160d46f3d3bb8fc3c2355c943aeb9468052;hpb=f22c29a66b399d50e0575f7a0ba71e6375caebf3;p=Sone.git diff --git a/src/test/kotlin/net/pterodactylus/sone/notify/ListNotificationTest.kt b/src/test/kotlin/net/pterodactylus/sone/notify/ListNotificationTest.kt index 0c81516..4c82035 100644 --- a/src/test/kotlin/net/pterodactylus/sone/notify/ListNotificationTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/notify/ListNotificationTest.kt @@ -21,6 +21,14 @@ class ListNotificationTest { } @Test + @Suppress("UNCHECKED_CAST") + fun `list in template context gets updated when elements are added`() { + listNotification.add("a") + listNotification.add("b") + assertThat(template.initialContext.get(KEY) as Iterable, contains("a", "b")) + } + + @Test fun `new list notification has no element`() { assertThat(listNotification.elements, emptyIterable()) }