update tests
This commit is contained in:
parent
b53573a837
commit
969769730e
|
@ -49,7 +49,7 @@ test "gets a feed", %{conn: conn} do
|
||||||
response =
|
response =
|
||||||
conn
|
conn
|
||||||
|> put_req_header("content-type", "application/atom+xml")
|
|> put_req_header("content-type", "application/atom+xml")
|
||||||
|> get("/tags/pleromaart.rss")
|
|> get(tag_feed_path(conn, :feed, "pleromaart.rss"))
|
||||||
|> response(200)
|
|> response(200)
|
||||||
|
|
||||||
xml = parse(response)
|
xml = parse(response)
|
||||||
|
|
|
@ -49,7 +49,7 @@ test "gets a feed", %{conn: conn} do
|
||||||
resp =
|
resp =
|
||||||
conn
|
conn
|
||||||
|> put_req_header("content-type", "application/atom+xml")
|
|> put_req_header("content-type", "application/atom+xml")
|
||||||
|> get("/users/#{user.nickname}/feed.atom")
|
|> get(user_feed_path(conn, :feed, user.nickname))
|
||||||
|> response(200)
|
|> response(200)
|
||||||
|
|
||||||
activity_titles =
|
activity_titles =
|
||||||
|
@ -65,7 +65,7 @@ test "returns 404 for a missing feed", %{conn: conn} do
|
||||||
conn =
|
conn =
|
||||||
conn
|
conn
|
||||||
|> put_req_header("content-type", "application/atom+xml")
|
|> put_req_header("content-type", "application/atom+xml")
|
||||||
|> get("/users/nonexisting/feed.atom")
|
|> get(user_feed_path(conn, :feed, "nonexisting"))
|
||||||
|
|
||||||
assert response(conn, 404)
|
assert response(conn, 404)
|
||||||
end
|
end
|
||||||
|
@ -91,7 +91,7 @@ test "undefined format. it returns error when user not found", %{conn: conn} do
|
||||||
response =
|
response =
|
||||||
conn
|
conn
|
||||||
|> put_req_header("accept", "application/xml")
|
|> put_req_header("accept", "application/xml")
|
||||||
|> get("/users/jimm")
|
|> get(user_feed_path(conn, :feed, "jimm"))
|
||||||
|> response(404)
|
|> response(404)
|
||||||
|
|
||||||
assert response == ~S({"error":"Not found"})
|
assert response == ~S({"error":"Not found"})
|
||||||
|
|
Loading…
Reference in New Issue