Autofix Rubocops RSpec/ScatteredLet (#23725)
This commit is contained in:
		
					parent
					
						
							
								aef0051fd0
							
						
					
				
			
			
				commit
				
					
						5179c47087
					
				
			
		
					 9 changed files with 56 additions and 83 deletions
				
			
		|  | @ -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 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue