1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-11-18 10:59:17 +00:00

fixes- found that TwitterAPI.Controller adds .json suffix already

This commit is contained in:
Vivian Lim 2018-06-23 23:05:54 -07:00
parent f2badd4424
commit 6316003946
2 changed files with 20 additions and 1 deletions

View file

@ -269,7 +269,7 @@ def user_fetcher(username) do
get("/friendships/no_retweets/ids", TwitterAPI.Controller, :empty_array)
get("/mutes/users/ids", TwitterAPI.Controller, :empty_array)
get("/qvitter/mutes.json", TwitterAPI.Controller, :empty_array)
get("/qvitter/mutes", TwitterAPI.Controller, :empty_array)
get("/externalprofile/show", TwitterAPI.Controller, :external_profile)
end

View file

@ -491,6 +491,25 @@ test "with credentials", %{conn: conn, user: current_user} do
end
end
describe "GET /api/qvitter/mutes.json" do
setup [:valid_user]
test "unimplemented mutes without valid credentials", %{conn: conn} do
conn = get(conn, "/api/qvitter/mutes.json")
assert json_response(conn, 403) == %{"error" => "Invalid credentials."}
end
test "unimplemented mutes with credentials", %{conn: conn, user: current_user} do
conn =
conn
|> with_credentials(current_user.nickname, "test")
|> get("/api/qvitter/mutes.json")
current_user = Repo.get(User, current_user.id)
assert "[]" = json_response(conn, 200)
end
end
describe "POST /api/favorites/create/:id" do
setup [:valid_user]