Assign token that can write to follows

This commit is contained in:
Mark Felder 2020-01-12 12:14:09 -06:00
parent 2f5b8fbeb3
commit e64059d218

View File

@ -95,6 +95,7 @@ test "follows user", %{conn: conn} do
response =
conn
|> assign(:user, user)
|> assign(:token, insert(:oauth_token, user: user, scopes: ["write:follows"]))
|> post(remote_follow_path(conn, :do_follow), %{"user" => %{"id" => user2.id}})
|> response(200)
@ -151,6 +152,7 @@ test "returns success result when user already in followers", %{conn: conn} do
response =
conn
|> assign(:user, refresh_record(user))
|> assign(:token, insert(:oauth_token, user: user, scopes: ["write:follows"]))
|> post(remote_follow_path(conn, :do_follow), %{"user" => %{"id" => user2.id}})
|> response(200)