From: David ‘Bombe’ Roden Date: Thu, 31 Aug 2017 18:30:38 +0000 (+0200) Subject: Use error property of JSON return object X-Git-Tag: 0.9.7^2~101 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=d0494c86bb8010b56a429fe4d59d18c9bc062850;p=Sone.git Use error property of JSON return object --- diff --git a/src/test/kotlin/net/pterodactylus/sone/web/ajax/BookmarkAjaxPageTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/ajax/BookmarkAjaxPageTest.kt index d6ade8b..7e72e56 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/ajax/BookmarkAjaxPageTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/ajax/BookmarkAjaxPageTest.kt @@ -16,14 +16,14 @@ class BookmarkAjaxPageTest : JsonPageTest("bookmark.ajax", requiresLogin = false @Test fun `missing post ID results in invalid id response`() { assertThat(json.isSuccess, equalTo(false)) - assertThat((json as JsonErrorReturnObject).error, equalTo("invalid-post-id")) + assertThat(json.error, equalTo("invalid-post-id")) } @Test fun `empty post ID results in invalid id response`() { addRequestParameter("post", "") assertThat(json.isSuccess, equalTo(false)) - assertThat((json as JsonErrorReturnObject).error, equalTo("invalid-post-id")) + assertThat(json.error, equalTo("invalid-post-id")) } @Test