diff options
author | lain <lain@soykaf.club> | 2020-09-21 17:15:54 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-09-21 17:15:54 +0000 |
commit | 9108e27c2f77fd0f49b9ad7c31f6577377236fb2 (patch) | |
tree | 8da6c543e355286e48a54dea10b19e3f9c12d874 /test/notification_test.exs | |
parent | b36b6259d8fcd677cfe3c5dc97d25bdc45c226f5 (diff) | |
parent | 60b025b782eb27b86a791451149b6690431371dc (diff) | |
download | pleroma-9108e27c2f77fd0f49b9ad7c31f6577377236fb2.tar.gz pleroma-9108e27c2f77fd0f49b9ad7c31f6577377236fb2.zip |
Merge branch '2074-streaming-api-oauth-scopes-validation' into 'develop'
[#2074] OAuth scope checking in Streaming API
Closes #2074
See merge request pleroma/pleroma!3013
Diffstat (limited to 'test/notification_test.exs')
-rw-r--r-- | test/notification_test.exs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/notification_test.exs b/test/notification_test.exs index a09b08675..f2e0f0b0d 100644 --- a/test/notification_test.exs +++ b/test/notification_test.exs @@ -179,17 +179,19 @@ defmodule Pleroma.NotificationTest do describe "create_notification" do @tag needs_streamer: true test "it creates a notification for user and send to the 'user' and the 'user:notification' stream" do - user = insert(:user) + %{user: user, token: oauth_token} = oauth_access(["read"]) task = Task.async(fn -> - Streamer.get_topic_and_add_socket("user", user) + {:ok, _topic} = Streamer.get_topic_and_add_socket("user", user, oauth_token) assert_receive {:render_with_user, _, _, _}, 4_000 end) task_user_notification = Task.async(fn -> - Streamer.get_topic_and_add_socket("user:notification", user) + {:ok, _topic} = + Streamer.get_topic_and_add_socket("user:notification", user, oauth_token) + assert_receive {:render_with_user, _, _, _}, 4_000 end) |