Remove Salmon and PubSubHubbub (#11205)
* Remove Salmon and PubSubHubbub endpoints * Add error when trying to follow OStatus accounts * Fix new accounts not being created in ResolveAccountService
This commit is contained in:
@ -75,44 +75,6 @@ RSpec.describe Admin::AccountsController, type: :controller do
|
||||
end
|
||||
end
|
||||
|
||||
describe 'POST #subscribe' do
|
||||
subject { post :subscribe, params: { id: account.id } }
|
||||
|
||||
let(:current_user) { Fabricate(:user, admin: admin) }
|
||||
let(:account) { Fabricate(:account) }
|
||||
|
||||
context 'when user is admin' do
|
||||
let(:admin) { true }
|
||||
|
||||
it { is_expected.to redirect_to admin_account_path(account.id) }
|
||||
end
|
||||
|
||||
context 'when user is not admin' do
|
||||
let(:admin) { false }
|
||||
|
||||
it { is_expected.to have_http_status :forbidden }
|
||||
end
|
||||
end
|
||||
|
||||
describe 'POST #unsubscribe' do
|
||||
subject { post :unsubscribe, params: { id: account.id } }
|
||||
|
||||
let(:current_user) { Fabricate(:user, admin: admin) }
|
||||
let(:account) { Fabricate(:account) }
|
||||
|
||||
context 'when user is admin' do
|
||||
let(:admin) { true }
|
||||
|
||||
it { is_expected.to redirect_to admin_account_path(account.id) }
|
||||
end
|
||||
|
||||
context 'when user is not admin' do
|
||||
let(:admin) { false }
|
||||
|
||||
it { is_expected.to have_http_status :forbidden }
|
||||
end
|
||||
end
|
||||
|
||||
describe 'POST #memorialize' do
|
||||
subject { post :memorialize, params: { id: account.id } }
|
||||
|
||||
|
@ -1,32 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Admin::SubscriptionsController, type: :controller do
|
||||
render_views
|
||||
|
||||
describe 'GET #index' do
|
||||
around do |example|
|
||||
default_per_page = Subscription.default_per_page
|
||||
Subscription.paginates_per 1
|
||||
example.run
|
||||
Subscription.paginates_per default_per_page
|
||||
end
|
||||
|
||||
before do
|
||||
sign_in Fabricate(:user, admin: true), scope: :user
|
||||
end
|
||||
|
||||
it 'renders subscriptions' do
|
||||
Fabricate(:subscription)
|
||||
specified = Fabricate(:subscription)
|
||||
|
||||
get :index
|
||||
|
||||
subscriptions = assigns(:subscriptions)
|
||||
expect(subscriptions.count).to eq 1
|
||||
expect(subscriptions[0]).to eq specified
|
||||
|
||||
expect(response).to have_http_status(200)
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user