Make Web::PushSubscription#user
and Web::PushSubscription#access_token
relationships non-optional (#34498)
Co-authored-by: Emelia Smith <ThisIsMissEm@users.noreply.github.com>
This commit is contained in:
parent
dee744c793
commit
7bc301e184
9 changed files with 66 additions and 37 deletions
|
@ -8,4 +8,6 @@ Fabricator(:web_push_subscription, from: Web::PushSubscription) do
|
|||
Base64.urlsafe_encode64(ecdh_key)
|
||||
end
|
||||
key_auth { Base64.urlsafe_encode64(Random.new.bytes(16)) }
|
||||
user { Fabricate(:user) }
|
||||
access_token { |attrs| Fabricate.build(:accessible_access_token, resource_owner_id: attrs[:user].id) }
|
||||
end
|
||||
|
|
|
@ -207,7 +207,8 @@ RSpec.describe 'API V1 Push Subscriptions' do
|
|||
Fabricate(
|
||||
:web_push_subscription,
|
||||
endpoint: create_payload[:subscription][:endpoint],
|
||||
access_token_id: token.id
|
||||
access_token: token,
|
||||
user: user
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue