logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma
commit: 0c871e5c6eb35d9d8c78cfdc83af869f312389b8
parent: 44295dd49ad004b8c7a289387e913b1234ad1e61
Author: Roger Braun <roger@rogerbraun.net>
Date:   Tue, 31 Oct 2017 17:57:26 +0100

Fix specs.

Diffstat:

Mtest/web/mastodon_api/mastodon_api_controller_test.exs16++++++++--------
Mtest/web/twitter_api/twitter_api_test.exs2+-
2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -91,7 +91,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do |> get("/api/v1/statuses/#{activity.id}") assert %{"id" => id} = json_response(conn, 200) - assert id == activity.id + assert id == to_string(activity.id) end describe "deleting a status" do @@ -132,7 +132,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do |> post("/api/v1/statuses/#{activity.id}/reblog") assert %{"id" => id, "reblogged" => true, "reblogs_count" => 1} = json_response(conn, 200) - assert activity.id == id + assert to_string(activity.id) == id end end @@ -146,7 +146,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do |> post("/api/v1/statuses/#{activity.id}/favourite") assert %{"id" => id, "favourites_count" => 1, "favourited" => true} = json_response(conn, 200) - assert activity.id == id + assert to_string(activity.id) == id end end @@ -162,7 +162,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do |> post("/api/v1/statuses/#{activity.id}/unfavourite") assert %{"id" => id, "favourites_count" => 0, "favourited" => false} = json_response(conn, 200) - assert activity.id == id + assert to_string(activity.id) == id end end @@ -178,7 +178,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do assert [%{"id" => id}] = json_response(conn, 200) - assert id == note_two.id + assert id == to_string(note_two.id) end end @@ -238,7 +238,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do assert [%{"id" => id}] = json_response(conn, 200) - assert id == activity.id + assert id == to_string(activity.id) end test "getting followers", %{conn: conn} do @@ -351,7 +351,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do assert results["hashtags"] == [] [status] = results["statuses"] - assert status["id"] == activity.id + assert status["id"] == to_string(activity.id) end test "search fetches remote accounts", %{conn: conn} do @@ -377,6 +377,6 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do |> get("/api/v1/favourites") assert [status] = json_response(conn, 200) - assert status["id"] == activity.id + assert status["id"] == to_string(activity.id) end end diff --git a/test/web/twitter_api/twitter_api_test.exs b/test/web/twitter_api/twitter_api_test.exs @@ -365,7 +365,7 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do {:ok, represented} = TwitterAPI.get_external_profile(user, id) remote = User.get_by_ap_id(id) - assert represented == UserView.render("show.json", %{user: remote, for: user}) + assert represented["id"] == UserView.render("show.json", %{user: remote, for: user})["id"] # Also fetches the feed. assert Activity.get_create_activity_by_object_ap_id("tag:mastodon.social,2017-04-05:objectId=1641750:objectType=Status")