tests: fix up some more broken mastodon api testcases

This commit is contained in:
William Pitcock 2018-11-20 19:08:41 +00:00
parent 3456948cd1
commit 5b3480d896

View File

@ -252,7 +252,7 @@ test "verify_credentials", %{conn: conn} do
end end
test "verify_credentials default scope unlisted", %{conn: conn} do test "verify_credentials default scope unlisted", %{conn: conn} do
user = insert(:user, %{info: %{"default_scope" => "unlisted"}}) user = insert(:user, %{info: %{default_scope: "unlisted"}})
conn = conn =
conn conn
@ -845,7 +845,7 @@ test "returns the relationships for the current user", %{conn: conn} do
describe "locked accounts" do describe "locked accounts" do
test "/api/v1/follow_requests works" do test "/api/v1/follow_requests works" do
user = insert(:user, %{info: %{"locked" => true}}) user = insert(:user, %{info: %{locked: true}})
other_user = insert(:user) other_user = insert(:user)
{:ok, activity} = ActivityPub.follow(other_user, user) {:ok, activity} = ActivityPub.follow(other_user, user)
@ -865,7 +865,7 @@ test "/api/v1/follow_requests works" do
end end
test "/api/v1/follow_requests/:id/authorize works" do test "/api/v1/follow_requests/:id/authorize works" do
user = insert(:user, %{info: %{"locked" => true}}) user = insert(:user, %{info: %{locked: true}})
other_user = insert(:user) other_user = insert(:user)
{:ok, activity} = ActivityPub.follow(other_user, user) {:ok, activity} = ActivityPub.follow(other_user, user)
@ -890,7 +890,7 @@ test "/api/v1/follow_requests/:id/authorize works" do
end end
test "verify_credentials", %{conn: conn} do test "verify_credentials", %{conn: conn} do
user = insert(:user, %{info: %{"default_scope" => "private"}}) user = insert(:user, %{info: %{default_scope: "private"}})
conn = conn =
conn conn
@ -902,7 +902,7 @@ test "verify_credentials", %{conn: conn} do
end end
test "/api/v1/follow_requests/:id/reject works" do test "/api/v1/follow_requests/:id/reject works" do
user = insert(:user, %{info: %{"locked" => true}}) user = insert(:user, %{info: %{locked: true}})
other_user = insert(:user) other_user = insert(:user)
{:ok, activity} = ActivityPub.follow(other_user, user) {:ok, activity} = ActivityPub.follow(other_user, user)