You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
564 B

  1. require 'rails_helper'
  2. RSpec.describe Api::V1::FavouritesController, type: :controller do
  3. render_views
  4. let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) }
  5. let(:token) { double acceptable?: true, resource_owner_id: user.id }
  6. before do
  7. Fabricate(:favourite, account: user.account)
  8. allow(controller).to receive(:doorkeeper_token) { token }
  9. end
  10. describe 'GET #index' do
  11. it 'returns http success' do
  12. get :index, params: { limit: 1 }
  13. expect(response).to have_http_status(:success)
  14. end
  15. end
  16. end