X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FGetStatusAjaxPageTest.kt;h=0d8cb543639a1487a86f309a5e27224f9cd9a259;hb=90098a7e334d7af6a709bfac3e5ee8bf963c793a;hp=58193a9eb94570ecee898d7d2fb1032928e506a2;hpb=a57c17c9a431eeb5925cc8a4e7500c53c9b3f412;p=Sone.git diff --git a/src/test/kotlin/net/pterodactylus/sone/web/ajax/GetStatusAjaxPageTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/ajax/GetStatusAjaxPageTest.kt index 58193a9..0d8cb54 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/ajax/GetStatusAjaxPageTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/ajax/GetStatusAjaxPageTest.kt @@ -54,9 +54,9 @@ class GetStatusAjaxPageTest: JsonPageTest("getStatus.ajax", requiresLogin = fals @Test fun `page returns options for sone if sone is logged in`() { assertThat(json.get("options").toMap(), allOf( - hasEntry("ShowNotification/NewSones", "false"), - hasEntry("ShowNotification/NewPosts", "false"), - hasEntry("ShowNotification/NewReplies", "false") + hasEntry("ShowNotification/NewSones", "true"), + hasEntry("ShowNotification/NewPosts", "true"), + hasEntry("ShowNotification/NewReplies", "true") )) } @@ -97,7 +97,7 @@ class GetStatusAjaxPageTest: JsonPageTest("getStatus.ajax", requiresLogin = fals mock().apply { whenever(this.createdTime).thenReturn(2000) }, mock().apply { whenever(this.createdTime).thenReturn(1000) } ) - addNotification(*notifications.toTypedArray()) + notifications.forEachIndexed { index, notification -> addNotification(notification, "notification$index")} assertThat(json.get("notificationHash").asInt(), equalTo(notifications.sortedBy { it.createdTime }.hashCode())) }