Improve spec coverage and clean up api/v1/favourites controller (#3472)
This commit is contained in:
		
				
					committed by
					
						
						Eugen Rochko
					
				
			
			
				
	
			
			
			
						parent
						
							2cc3111a77
						
					
				
				
					commit
					75cad1d9d6
				
			@@ -7,12 +7,14 @@ RSpec.describe Api::V1::FavouritesController, type: :controller do
 | 
			
		||||
  let(:token) { double acceptable?: true, resource_owner_id: user.id }
 | 
			
		||||
 | 
			
		||||
  before do
 | 
			
		||||
    Fabricate(:favourite, account: user.account)
 | 
			
		||||
    allow(controller).to receive(:doorkeeper_token) { token }
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  describe 'GET #index' do
 | 
			
		||||
    it 'returns http success' do
 | 
			
		||||
      get :index
 | 
			
		||||
      get :index, params: { limit: 1 }
 | 
			
		||||
 | 
			
		||||
      expect(response).to have_http_status(:success)
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user