diff options
| author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-04-14 20:10:02 +0300 | 
|---|---|---|
| committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-04-14 20:10:02 +0300 | 
| commit | 0cda80f266c03557b47112e52bfe748655b4321c (patch) | |
| tree | 3066cf037c65cd8a19aa0228cb75ec6acc94d870 /test/web/mastodon_api | |
| parent | 650853fc895fb2e21eac347e056eab98b842a3b7 (diff) | |
| parent | 6c3e09fbce823fe1ddef96a4a1ec54d67ceeec50 (diff) | |
| download | pleroma-0cda80f266c03557b47112e52bfe748655b4321c.tar.gz pleroma-0cda80f266c03557b47112e52bfe748655b4321c.zip  | |
Merge remote-tracking branch 'remotes/origin/develop' into 1364-no-pushes-from-blocked-domains-users
# Conflicts:
#	lib/pleroma/notification.ex
Diffstat (limited to 'test/web/mastodon_api')
| -rw-r--r-- | test/web/mastodon_api/controllers/marker_controller_test.exs | 10 | ||||
| -rw-r--r-- | test/web/mastodon_api/views/marker_view_test.exs | 8 | 
2 files changed, 6 insertions, 12 deletions
diff --git a/test/web/mastodon_api/controllers/marker_controller_test.exs b/test/web/mastodon_api/controllers/marker_controller_test.exs index 7280abd10..919f295bd 100644 --- a/test/web/mastodon_api/controllers/marker_controller_test.exs +++ b/test/web/mastodon_api/controllers/marker_controller_test.exs @@ -11,7 +11,6 @@ defmodule Pleroma.Web.MastodonAPI.MarkerControllerTest do      test "gets markers with correct scopes", %{conn: conn} do        user = insert(:user)        token = insert(:oauth_token, user: user, scopes: ["read:statuses"]) -      insert_list(7, :notification, user: user)        {:ok, %{"notifications" => marker}} =          Pleroma.Marker.upsert( @@ -30,8 +29,7 @@ defmodule Pleroma.Web.MastodonAPI.MarkerControllerTest do                 "notifications" => %{                   "last_read_id" => "69420",                   "updated_at" => NaiveDateTime.to_iso8601(marker.updated_at), -                 "version" => 0, -                 "pleroma" => %{"unread_count" => 7} +                 "version" => 0                 }               }      end @@ -72,8 +70,7 @@ defmodule Pleroma.Web.MastodonAPI.MarkerControllerTest do                 "notifications" => %{                   "last_read_id" => "69420",                   "updated_at" => _, -                 "version" => 0, -                 "pleroma" => %{"unread_count" => 0} +                 "version" => 0                 }               } = response      end @@ -102,8 +99,7 @@ defmodule Pleroma.Web.MastodonAPI.MarkerControllerTest do                 "notifications" => %{                   "last_read_id" => "69888",                   "updated_at" => NaiveDateTime.to_iso8601(marker.updated_at), -                 "version" => 0, -                 "pleroma" => %{"unread_count" => 0} +                 "version" => 0                 }               }      end diff --git a/test/web/mastodon_api/views/marker_view_test.exs b/test/web/mastodon_api/views/marker_view_test.exs index 48a0a6d33..893cf8857 100644 --- a/test/web/mastodon_api/views/marker_view_test.exs +++ b/test/web/mastodon_api/views/marker_view_test.exs @@ -8,21 +8,19 @@ defmodule Pleroma.Web.MastodonAPI.MarkerViewTest do    import Pleroma.Factory    test "returns markers" do -    marker1 = insert(:marker, timeline: "notifications", last_read_id: "17", unread_count: 5) +    marker1 = insert(:marker, timeline: "notifications", last_read_id: "17")      marker2 = insert(:marker, timeline: "home", last_read_id: "42")      assert MarkerView.render("markers.json", %{markers: [marker1, marker2]}) == %{               "home" => %{                 last_read_id: "42",                 updated_at: NaiveDateTime.to_iso8601(marker2.updated_at), -               version: 0, -               pleroma: %{unread_count: 0} +               version: 0               },               "notifications" => %{                 last_read_id: "17",                 updated_at: NaiveDateTime.to_iso8601(marker1.updated_at), -               version: 0, -               pleroma: %{unread_count: 5} +               version: 0               }             }    end  | 
