diff --git a/test/hunter/notification_test.exs b/test/hunter/notification_test.exs index d17030b..59ed398 100644 --- a/test/hunter/notification_test.exs +++ b/test/hunter/notification_test.exs @@ -28,4 +28,20 @@ defmodule Hunter.NotificationTest do assert "paperswelove" == notification.account.username assert "follow" == notification.type end + + test "deletes all notifications from Mastodon server" do + expect(Hunter.ApiMock, :clear_notifications, fn _conn -> + true + end) + + assert Notification.clear_notifications(@conn) + end + + test "dismiss a single notification" do + expect(Hunter.ApiMock, :clear_notification, fn _conn, _id -> + true + end) + + assert Notification.clear_notification(@conn, 17_476) + end end