diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/controllers/api/v1/accounts_controller_spec.rb | 1 | ||||
-rw-r--r-- | spec/controllers/api/v1/blocks_controller_spec.rb | 19 | ||||
-rw-r--r-- | spec/controllers/api/v1/timelines_controller_spec.rb | 1 | ||||
-rw-r--r-- | spec/helpers/api/oembed_helper_spec.rb | 5 |
4 files changed, 19 insertions, 7 deletions
diff --git a/spec/controllers/api/v1/accounts_controller_spec.rb b/spec/controllers/api/v1/accounts_controller_spec.rb index e4532305b..98b284f7a 100644 --- a/spec/controllers/api/v1/accounts_controller_spec.rb +++ b/spec/controllers/api/v1/accounts_controller_spec.rb @@ -7,7 +7,6 @@ RSpec.describe Api::V1::AccountsController, type: :controller do let(:token) { double acceptable?: true, resource_owner_id: user.id } before do - stub_request(:post, "https://pubsubhubbub.superfeedr.com/").to_return(:status => 200, :body => "", :headers => {}) allow(controller).to receive(:doorkeeper_token) { token } end diff --git a/spec/controllers/api/v1/blocks_controller_spec.rb b/spec/controllers/api/v1/blocks_controller_spec.rb new file mode 100644 index 000000000..ca20a2d17 --- /dev/null +++ b/spec/controllers/api/v1/blocks_controller_spec.rb @@ -0,0 +1,19 @@ +require 'rails_helper' + +RSpec.describe Api::V1::BlocksController, type: :controller do + render_views + + let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } + let(:token) { double acceptable?: true, resource_owner_id: user.id } + + before do + allow(controller).to receive(:doorkeeper_token) { token } + end + + describe 'GET #index' do + it 'returns http success' do + get :index + expect(response).to have_http_status(:success) + end + end +end diff --git a/spec/controllers/api/v1/timelines_controller_spec.rb b/spec/controllers/api/v1/timelines_controller_spec.rb index c94519ac5..5e9954baf 100644 --- a/spec/controllers/api/v1/timelines_controller_spec.rb +++ b/spec/controllers/api/v1/timelines_controller_spec.rb @@ -6,7 +6,6 @@ RSpec.describe Api::V1::TimelinesController, type: :controller do let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } before do - stub_request(:post, "https://pubsubhubbub.superfeedr.com/").to_return(:status => 200, :body => "", :headers => {}) allow(controller).to receive(:doorkeeper_token) { token } end diff --git a/spec/helpers/api/oembed_helper_spec.rb b/spec/helpers/api/oembed_helper_spec.rb deleted file mode 100644 index a671e2d65..000000000 --- a/spec/helpers/api/oembed_helper_spec.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'rails_helper' - -RSpec.describe Api::OembedHelper, type: :helper do - -end |