diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2019-04-08 16:29:20 +0700 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2019-04-08 16:29:20 +0700 |
commit | a1a854646e96598473ed7a323e034cf1f88ca508 (patch) | |
tree | 4a427437c7c444fdfd2bb99dc012a7008d9bb0fe /test/support | |
parent | 1c2e4f88d1a707791818014f8bcdedd986c2fa75 (diff) | |
parent | fb2040d06199f2f4190ff363da54d6fcfa87ff69 (diff) | |
download | pleroma-a1a854646e96598473ed7a323e034cf1f88ca508.tar.gz pleroma-a1a854646e96598473ed7a323e034cf1f88ca508.zip |
Merge branch 'develop' into use-jobs-in-webpush
Diffstat (limited to 'test/support')
-rw-r--r-- | test/support/factory.ex | 10 |
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), |