From 49834a6e7f06301a5bcc17b8771ed4513622b6a8 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 29 Dec 2016 20:12:32 +0100 Subject: Add API for retrieving blocked accounts --- spec/controllers/api/v1/accounts_controller_spec.rb | 1 - spec/controllers/api/v1/blocks_controller_spec.rb | 19 +++++++++++++++++++ spec/controllers/api/v1/timelines_controller_spec.rb | 1 - 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 spec/controllers/api/v1/blocks_controller_spec.rb (limited to 'spec/controllers/api/v1') 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 -- cgit