0
0
Fork 0

Autofix Rubocops RSpec/ScatteredLet (#23725)

This commit is contained in:
Nick Schonning 2023-02-19 21:17:41 -05:00 committed by GitHub
parent aef0051fd0
commit 5179c47087
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 56 additions and 83 deletions

View file

@ -5,13 +5,7 @@ require 'rails_helper'
describe Api::V1::Push::SubscriptionsController do
render_views
let(:user) { Fabricate(:user) }
let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'push') }
before do
allow(controller).to receive(:doorkeeper_token) { token }
end
let(:user) { Fabricate(:user) }
let(:create_payload) do
{
subscription: {
@ -23,7 +17,6 @@ describe Api::V1::Push::SubscriptionsController do
},
}.with_indifferent_access
end
let(:alerts_payload) do
{
data: {
@ -41,6 +34,11 @@ describe Api::V1::Push::SubscriptionsController do
},
}.with_indifferent_access
end
let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'push') }
before do
allow(controller).to receive(:doorkeeper_token) { token }
end
describe 'POST #create' do
before do