diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-07-08 12:04:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-08 12:04:06 +0200 |
commit | ef1524639776fe7d7be2d5c414fc98dd2410a5f4 (patch) | |
tree | ed6cd735b1b0aded08eacaaac3616a45dd59a0f3 /spec/controllers | |
parent | 63c7fe8e4892b22e80c015bf0ecb04496318623b (diff) |
Remove unused remote unfollow controller (#11250)
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/remote_unfollows_controller_spec.rb | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/spec/controllers/remote_unfollows_controller_spec.rb b/spec/controllers/remote_unfollows_controller_spec.rb deleted file mode 100644 index a1a55ede0..000000000 --- a/spec/controllers/remote_unfollows_controller_spec.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -require 'rails_helper' - -describe RemoteUnfollowsController do - render_views - - describe '#create' do - subject { post :create, params: { acct: acct } } - - let(:current_user) { Fabricate(:user, account: current_account) } - let(:current_account) { Fabricate(:account) } - let(:remote_account) { Fabricate(:user, email: 'bob@example.com', account: Fabricate(:account, username: 'bob', protocol: :activitypub, domain: 'example.com', inbox_url: 'http://example.com/inbox')).account } - before do - sign_in current_user - current_account.follow!(remote_account) - stub_request(:post, 'http://example.com/inbox') { { status: 200 } } - end - - context 'when successfully unfollow remote account' do - let(:acct) { "acct:#{remote_account.username}@#{remote_account.domain}" } - - it do - is_expected.to render_template :success - expect(current_account.following?(remote_account)).to be false - end - end - - context 'when fails to unfollow remote account' do - let(:acct) { "acct:#{remote_account.username + '_test'}@#{remote_account.domain}" } - - it do - is_expected.to render_template :error - expect(current_account.following?(remote_account)).to be true - end - end - end -end |