diff options
author | Matt Jankowski <matt@jankowski.online> | 2023-03-04 11:12:54 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-04 17:12:54 +0100 |
commit | ad585fb1959abe38839c30137cf3343737f1d247 (patch) | |
tree | fb54e2d608fb03b5b8a9d6339752a0ae505f0ac6 /spec/controllers/api/v1/featured_tags | |
parent | cd99fa8cebc6efa059b4fca743d517c88f8d9686 (diff) |
Specs api v1 controllers (#23930)
Diffstat (limited to 'spec/controllers/api/v1/featured_tags')
-rw-r--r-- | spec/controllers/api/v1/featured_tags/suggestions_controller_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/controllers/api/v1/featured_tags/suggestions_controller_spec.rb b/spec/controllers/api/v1/featured_tags/suggestions_controller_spec.rb new file mode 100644 index 000000000..54c63dcc6 --- /dev/null +++ b/spec/controllers/api/v1/featured_tags/suggestions_controller_spec.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +require 'rails_helper' + +describe Api::V1::FeaturedTags::SuggestionsController do + render_views + + let(:user) { Fabricate(:user) } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'read:accounts') } + let(:account) { Fabricate(:account) } + + before do + allow(controller).to receive(:doorkeeper_token) { token } + end + + describe 'GET #index' do + it 'returns http success' do + get :index, params: { account_id: account.id, limit: 2 } + + expect(response).to have_http_status(200) + end + end +end |