aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2019-10-30 23:49:05 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2019-10-30 23:49:05 +0300
commit209319c8d289564653f73cbf15fb6449d91cf3ca (patch)
tree541f69a6a4f78a2dc854fe7bccff179e71e3edcd /test
parent1b82eb6d4102bc2d7acec0a905e7714c95eadc94 (diff)
downloadpleroma-209319c8d289564653f73cbf15fb6449d91cf3ca.tar.gz
update marker api
Diffstat (limited to 'test')
-rw-r--r--test/web/mastodon_api/controllers/marker_controller_test.exs20
-rw-r--r--test/web/mastodon_api/views/marker_view_test.exs8
2 files changed, 14 insertions, 14 deletions
diff --git a/test/web/mastodon_api/controllers/marker_controller_test.exs b/test/web/mastodon_api/controllers/marker_controller_test.exs
index 5e7b4001f..e0aacccb4 100644
--- a/test/web/mastodon_api/controllers/marker_controller_test.exs
+++ b/test/web/mastodon_api/controllers/marker_controller_test.exs
@@ -26,13 +26,13 @@ defmodule Pleroma.Web.MastodonAPI.MarkerControllerTest do
|> json_response(200)
assert response == %{
- "notifications" => %{
- "last_read_id" => "69420",
- "unread_count" => 7,
- "updated_at" => NaiveDateTime.to_iso8601(marker.updated_at),
- "version" => 0
- }
- }
+ "notifications" => %{
+ "last_read_id" => "69420",
+ "updated_at" => NaiveDateTime.to_iso8601(marker.updated_at),
+ "version" => 0,
+ "pleroma" => %{ "unread_count" => 7 }
+ }
+ }
end
test "gets markers with missed scopes", %{conn: conn} do
@@ -72,7 +72,7 @@ defmodule Pleroma.Web.MastodonAPI.MarkerControllerTest do
"last_read_id" => "69420",
"updated_at" => _,
"version" => 0,
- "unread_count" => 0
+ "pleroma" => %{ "unread_count" => 0 }
}
} = response
end
@@ -100,9 +100,9 @@ defmodule Pleroma.Web.MastodonAPI.MarkerControllerTest do
assert response == %{
"notifications" => %{
"last_read_id" => "69888",
- "unread_count" => 0,
"updated_at" => NaiveDateTime.to_iso8601(marker.updated_at),
- "version" => 0
+ "version" => 0,
+ "pleroma" => %{ "unread_count" => 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 3ce794617..f172e5023 100644
--- a/test/web/mastodon_api/views/marker_view_test.exs
+++ b/test/web/mastodon_api/views/marker_view_test.exs
@@ -14,15 +14,15 @@ defmodule Pleroma.Web.MastodonAPI.MarkerViewTest do
assert MarkerView.render("markers.json", %{markers: [marker1, marker2]}) == %{
"home" => %{
last_read_id: "42",
- unread_count: 0,
updated_at: NaiveDateTime.to_iso8601(marker2.updated_at),
- version: 0
+ version: 0,
+ pleroma: %{unread_count: 0}
},
"notifications" => %{
last_read_id: "17",
- unread_count: 5,
updated_at: NaiveDateTime.to_iso8601(marker1.updated_at),
- version: 0
+ version: 0,
+ pleroma: %{unread_count: 5}
}
}
end