about summary refs log tree commit diff
path: root/spec/services/resolve_account_service_spec.rb
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-05-06 20:51:20 -0500
committermultiple creatures <dev@multiple-creature.party>2019-05-21 03:16:23 -0500
commit6c374b51537126a2cba29f3eaf74faf1fc64ba96 (patch)
tree776239f0aaf7a0abed2d09440eccbb1d6d53a7a2 /spec/services/resolve_account_service_spec.rb
parent6e8ec7f0a538b5383da49c4435835b78c61da0bc (diff)
Drop OStatus support. Fix some of the Rspec tests.
Diffstat (limited to 'spec/services/resolve_account_service_spec.rb')
-rw-r--r--spec/services/resolve_account_service_spec.rb51
1 files changed, 0 insertions, 51 deletions
diff --git a/spec/services/resolve_account_service_spec.rb b/spec/services/resolve_account_service_spec.rb
index 27a85af7c..105ff6943 100644
--- a/spec/services/resolve_account_service_spec.rb
+++ b/spec/services/resolve_account_service_spec.rb
@@ -38,39 +38,6 @@ RSpec.describe ResolveAccountService, type: :service do
     expect(subject.call('hacker2@redirected.com')).to be_nil
   end
 
-  context 'with an OStatus account' do
-    it 'returns an already existing remote account' do
-      old_account      = Fabricate(:account, username: 'gargron', domain: 'quitter.no')
-      returned_account = subject.call('gargron@quitter.no')
-
-      expect(old_account.id).to eq returned_account.id
-    end
-
-    it 'returns a new remote account' do
-      account = subject.call('gargron@quitter.no')
-
-      expect(account.username).to eq 'gargron'
-      expect(account.domain).to eq 'quitter.no'
-      expect(account.remote_url).to eq 'https://quitter.no/api/statuses/user_timeline/7477.atom'
-    end
-
-    it 'follows a legitimate account redirection' do
-      account = subject.call('gargron@redirected.com')
-
-      expect(account.username).to eq 'gargron'
-      expect(account.domain).to eq 'quitter.no'
-      expect(account.remote_url).to eq 'https://quitter.no/api/statuses/user_timeline/7477.atom'
-    end
-
-    it 'returns a new remote account' do
-      account = subject.call('foo@localdomain.com')
-
-      expect(account.username).to eq 'foo'
-      expect(account.domain).to eq 'localdomain.com'
-      expect(account.remote_url).to eq 'https://webdomain.com/users/foo.atom'
-    end
-  end
-
   context 'with an ActivityPub account' do
     before do
       stub_request(:get, "https://ap.example.com/.well-known/webfinger?resource=acct:foo@ap.example.com").to_return(request_fixture('activitypub-webfinger.txt'))
@@ -79,24 +46,6 @@ RSpec.describe ResolveAccountService, type: :service do
       stub_request(:get, %r{https://ap.example.com/users/foo/\w+}).to_return(status: 404)
     end
 
-    it 'fallback to OStatus if actor json could not be fetched' do
-      stub_request(:get, "https://ap.example.com/users/foo").to_return(status: 404)
-
-      account = subject.call('foo@ap.example.com')
-
-      expect(account.ostatus?).to eq true
-      expect(account.remote_url).to eq 'https://ap.example.com/users/foo.atom'
-    end
-
-    it 'fallback to OStatus if actor json did not have inbox_url' do
-      stub_request(:get, "https://ap.example.com/users/foo").to_return(request_fixture('activitypub-actor-noinbox.txt'))
-
-      account = subject.call('foo@ap.example.com')
-
-      expect(account.ostatus?).to eq true
-      expect(account.remote_url).to eq 'https://ap.example.com/users/foo.atom'
-    end
-
     it 'returns new remote account' do
       account = subject.call('foo@ap.example.com')