projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11d2287
)
Add tests.
author
eal
<eal@waifu.club>
Fri, 27 Oct 2017 10:55:36 +0000
(13:55 +0300)
committer
eal
<eal@waifu.club>
Sat, 28 Oct 2017 14:09:32 +0000
(17:09 +0300)
test/web/mastodon_api/mastodon_api_controller_test.exs
patch
|
blob
|
history
diff --git
a/test/web/mastodon_api/mastodon_api_controller_test.exs
b/test/web/mastodon_api/mastodon_api_controller_test.exs
index 56888140de04d61cb44c2424f7b767469f5c4765..af2351706517868b5328c61bef40718c881b5e04 100644
(file)
--- a/
test/web/mastodon_api/mastodon_api_controller_test.exs
+++ b/
test/web/mastodon_api/mastodon_api_controller_test.exs
@@
-281,6
+281,13
@@
defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
|> post("/api/v1/accounts/#{other_user.id}/unfollow")
assert %{"id" => id, "following" => false} = json_response(conn, 200)
+
+ user = Repo.get(User, user.id)
+ conn = build_conn()
+ |> assign(:user, user)
+ |> post("/api/v1/follows", %{"uri" => other_user.nickname})
+
+ assert %{"id" => id, "following" => true} = json_response(conn, 200)
end
test "unimplemented block/mute endpoints" do