diff options
| author | Karen Konou <konoukaren@gmail.com> | 2019-02-09 17:47:57 +0100 | 
|---|---|---|
| committer | Karen Konou <konoukaren@gmail.com> | 2019-02-09 17:47:57 +0100 | 
| commit | a0d732ec55fcbce8cf345344d1456dc77bb0f3bf (patch) | |
| tree | 050d0bbae605b270005d6e8aac9f8de28baa00d4 /test/web | |
| parent | 4430a0ad127411b818d875dbbaf14369c109f331 (diff) | |
| download | pleroma-a0d732ec55fcbce8cf345344d1456dc77bb0f3bf.tar.gz pleroma-a0d732ec55fcbce8cf345344d1456dc77bb0f3bf.zip  | |
it works!!
Diffstat (limited to 'test/web')
| -rw-r--r-- | test/web/thread_mute_test.exs | 25 | 
1 files changed, 13 insertions, 12 deletions
diff --git a/test/web/thread_mute_test.exs b/test/web/thread_mute_test.exs index 75277ef62..212cae860 100644 --- a/test/web/thread_mute_test.exs +++ b/test/web/thread_mute_test.exs @@ -10,31 +10,32 @@ defmodule Pleroma.Web.ThreadMuteTest do    describe "mute tests" do      setup do -      user = insert(:user, %{id: "1"}) +      user = insert(:user) -      activity = -        insert(:note_activity, %{ -          data: %{ -            "context" => "http://localhost:4000/contexts/361ca23e-ffa7-4773-b981-a355a18dc592" -          } -        }) +      activity = insert(:note_activity)        [user: user, activity: activity]      end      test "add mute", %{user: user, activity: activity} do        id = activity.id -      {:ok, mute} = add_mute(user, id) - -      assert mute.user_id == "1" -      assert mute.context == "http://localhost:4000/contexts/361ca23e-ffa7-4773-b981-a355a18dc592" +      {:ok, _activity} = add_mute(user, id)      end      test "remove mute", %{user: user, activity: activity} do        id = activity.id        add_mute(user, id) -      {1, nil} = remove_mute(user, id) +      {:ok, _activity} = remove_mute(user, id) +    end + +    test "check mute", %{user: user, activity: activity} do +      id = activity.id + +      add_mute(user, id) +      assert muted?(user, activity) +      remove_mute(user, id) +      refute muted?(user, activity)      end    end  end  | 
