aboutsummaryrefslogtreecommitdiff
path: root/test/support
diff options
context:
space:
mode:
authorSergey Suprunenko <suprunenko.s@gmail.com>2019-04-05 23:36:42 +0000
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>2019-04-05 23:36:42 +0000
commit325a2680173f714a5875ed726f9171e7984f7f7a (patch)
tree1992794218c3cb8477e919f62143437d96889c06 /test/support
parente3ca9f708fdb004771708c06095ed7b7e4cfce4d (diff)
downloadpleroma-325a2680173f714a5875ed726f9171e7984f7f7a.tar.gz
Redirect to the referer url after mastofe authorization
Diffstat (limited to 'test/support')
-rw-r--r--test/support/factory.ex10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/support/factory.ex b/test/support/factory.ex
index e1a08315a..b37bc2c07 100644
--- a/test/support/factory.ex
+++ b/test/support/factory.ex
@@ -240,6 +240,16 @@ defmodule Pleroma.Factory do
}
end
+ def oauth_authorization_factory do
+ %Pleroma.Web.OAuth.Authorization{
+ token: :crypto.strong_rand_bytes(32) |> Base.url_encode64(padding: false),
+ scopes: ["read", "write", "follow", "push"],
+ valid_until: NaiveDateTime.add(NaiveDateTime.utc_now(), 60 * 10),
+ user: build(:user),
+ app: build(:oauth_app)
+ }
+ end
+
def push_subscription_factory do
%Pleroma.Web.Push.Subscription{
user: build(:user),