aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/test')
-rw-r--r--juick-server/src/test/java/com/juick/server/tests/ServerTests.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java
index 4e4ad9c4..f1e3a58e 100644
--- a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java
@@ -1697,4 +1697,13 @@ public class ServerTests {
assertThat(msg.getTags().get(1).getName(), is("test2"));
assertThat(msg.getText(), is("test3"));
}
+ @Test
+ public void oneClickUnsubscribe() throws Exception {
+ mockMvc.perform(post("/settings/unsubscribe")
+ .param("hash", "123456")
+ .param("List-Unsubscribe", "One-Click")).andExpect(status().isBadRequest());
+ mockMvc.perform(post("/settings/unsubscribe")
+ .param("hash", userService.getHashByUID(ugnich.getUid()))
+ .param("List-Unsubscribe", "One-Click")).andExpect(status().isOk());
+ }
}