projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add spec for AccountController.following
[akkoma]
/
test
/
web
/
mastodon_api
/
controllers
/
status_controller_test.exs
diff --git
a/test/web/mastodon_api/controllers/status_controller_test.exs
b/test/web/mastodon_api/controllers/status_controller_test.exs
index cd9ca4973e6b97f8c85cec22bc56f8e3565bb2aa..162f7b1b2ccdb36d01ec87c35b24cec2ccbd39b5 100644
(file)
--- a/
test/web/mastodon_api/controllers/status_controller_test.exs
+++ b/
test/web/mastodon_api/controllers/status_controller_test.exs
@@
-1047,6
+1047,8
@@
defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
end
test "bookmarks" do
end
test "bookmarks" do
+ bookmarks_uri = "/api/v1/bookmarks?with_relationships=true"
+
%{conn: conn} = oauth_access(["write:bookmarks", "read:bookmarks"])
author = insert(:user)
%{conn: conn} = oauth_access(["write:bookmarks", "read:bookmarks"])
author = insert(:user)
@@
-1068,7
+1070,7
@@
defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
assert json_response(response2, 200)["bookmarked"] == true
assert json_response(response2, 200)["bookmarked"] == true
- bookmarks = get(conn,
"/api/v1/bookmarks"
)
+ bookmarks = get(conn,
bookmarks_uri
)
assert [json_response(response2, 200), json_response(response1, 200)] ==
json_response(bookmarks, 200)
assert [json_response(response2, 200), json_response(response1, 200)] ==
json_response(bookmarks, 200)
@@
-1077,7
+1079,7
@@
defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
assert json_response(response1, 200)["bookmarked"] == false
assert json_response(response1, 200)["bookmarked"] == false
- bookmarks = get(conn,
"/api/v1/bookmarks"
)
+ bookmarks = get(conn,
bookmarks_uri
)
assert [json_response(response2, 200)] == json_response(bookmarks, 200)
end
assert [json_response(response2, 200)] == json_response(bookmarks, 200)
end