From ce7f9f527c55b282a56c86a68c358a6272d01aee Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Tue, 31 Oct 2017 14:40:12 +0100 Subject: MastoAPI: Always return an url for statuses. External url if available, id if not. --- test/web/mastodon_api/status_view_test.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/web/mastodon_api/status_view_test.exs b/test/web/mastodon_api/status_view_test.exs index dc5cdfe9a..caa2c9d83 100644 --- a/test/web/mastodon_api/status_view_test.exs +++ b/test/web/mastodon_api/status_view_test.exs @@ -19,7 +19,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do expected = %{ id: note.id, uri: note.data["object"]["id"], - url: note.data["object"]["external_id"], + url: note.data["object"]["id"], account: AccountView.render("account.json", %{user: user}), in_reply_to_id: nil, in_reply_to_account_id: nil, -- cgit v1.2.3 From 2f39bb6b432ad993b86146d3e0284dc30653c6b4 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Tue, 31 Oct 2017 14:46:01 +0100 Subject: Typo. --- test/web/mastodon_api/mastodon_api_controller_test.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index 485a0d029..b97ca06e8 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -319,7 +319,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do end) end - test "account seach", %{conn: conn} do + test "account search", %{conn: conn} do user = insert(:user) user_two = insert(:user, %{nickname: "shp@shitposter.club"}) user_three = insert(:user, %{nickname: "shp@heldscal.la", name: "I love 2hu"}) -- cgit v1.2.3 From 968a546d4ac7d6b50af84aea71b3b37af8f2f669 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Tue, 31 Oct 2017 14:51:41 +0100 Subject: MastoAPI: Return id as string instead of integer. --- test/web/mastodon_api/status_view_test.exs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/web/mastodon_api/status_view_test.exs b/test/web/mastodon_api/status_view_test.exs index caa2c9d83..5aeee98c4 100644 --- a/test/web/mastodon_api/status_view_test.exs +++ b/test/web/mastodon_api/status_view_test.exs @@ -17,7 +17,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do |> String.replace(~r/\.\d+Z/, ".000Z") expected = %{ - id: note.id, + id: to_string(note.id), uri: note.data["object"]["id"], url: note.data["object"]["id"], account: AccountView.render("account.json", %{user: user}), @@ -101,7 +101,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do represented = StatusView.render("status.json", %{for: user, activity: reblog}) - assert represented[:id] == reblog.id - assert represented[:reblog][:id] == activity.id + assert represented[:id] == to_string(reblog.id) + assert represented[:reblog][:id] == to_string(activity.id) end end -- cgit v1.2.3