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.

23 lines
620 B

  1. require 'rails_helper'
  2. RSpec.describe Api::V1::PollsController, type: :controller do
  3. render_views
  4. let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) }
  5. let(:scopes) { 'read:statuses' }
  6. let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) }
  7. before { allow(controller).to receive(:doorkeeper_token) { token } }
  8. describe 'GET #show' do
  9. let(:poll) { Fabricate(:poll) }
  10. before do
  11. get :show, params: { id: poll.id }
  12. end
  13. it 'returns http success' do
  14. expect(response).to have_http_status(200)
  15. end
  16. end
  17. end