diff options
| author | Roman Chvanikov <chvanikoff@pm.me> | 2019-09-16 20:30:42 +0300 |
|---|---|---|
| committer | Roman Chvanikov <chvanikoff@pm.me> | 2019-09-16 20:30:42 +0300 |
| commit | 76c3e290fcb211ba21bf78711d832edbfc8f8979 (patch) | |
| tree | cb8c3846ceb42b261c58dd294a55c553524ade34 /test/web/mastodon_api | |
| parent | d7457c9165b83c0f1514cf0532b5a8bdc515ea02 (diff) | |
| parent | a58f29b826333c1ecb0907228f0e087a3ecd9778 (diff) | |
| download | pleroma-76c3e290fcb211ba21bf78711d832edbfc8f8979.tar.gz pleroma-76c3e290fcb211ba21bf78711d832edbfc8f8979.zip | |
Merge develop
Diffstat (limited to 'test/web/mastodon_api')
| -rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index 27a8366f7..1d2d9e134 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -14,6 +14,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do alias Pleroma.Repo alias Pleroma.ScheduledActivity alias Pleroma.SubscriptionNotification + alias Pleroma.Tests.ObanHelpers alias Pleroma.User alias Pleroma.Web.ActivityPub.ActivityPub alias Pleroma.Web.CommonAPI @@ -752,7 +753,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do query_string = "ids[]=#{id1}&ids[]=#{id2}" conn = get(conn, "/api/v1/statuses/?#{query_string}") - assert [%{"id" => ^id1}, %{"id" => ^id2}] = json_response(conn, :ok) + assert [%{"id" => ^id1}, %{"id" => ^id2}] = Enum.sort_by(json_response(conn, :ok), & &1["id"]) end describe "deleting a status" do @@ -4089,6 +4090,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do end test "it sends an email to user", %{user: user} do + ObanHelpers.perform_all() token_record = Repo.get_by(Pleroma.PasswordResetToken, user_id: user.id) email = Pleroma.Emails.UserEmail.password_reset_email(user, token_record.token) @@ -4149,6 +4151,8 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do |> post("/api/v1/pleroma/accounts/confirmation_resend?email=#{user.email}") |> json_response(:no_content) + ObanHelpers.perform_all() + email = Pleroma.Emails.UserEmail.account_confirmation_email(user) notify_email = Config.get([:instance, :notify_email]) instance_name = Config.get([:instance, :name]) |
