about summary refs log tree commit diff
path: root/spec/services
diff options
context:
space:
mode:
authorSurinna Curtis <ekiru.0@gmail.com>2018-05-02 05:40:24 -0500
committerEugen Rochko <eugen@zeonfederated.com>2018-05-02 12:40:24 +0200
commitdc786c0cf4467ade8db7d8b17e09f16923bfc1e8 (patch)
tree955931c945e9137b4883571cfd2d23bec1d59397 /spec/services
parent86efccce2a874d16aa783d989ff4824bcfac40b5 (diff)
Support Actors/Statuses with multiple types (#7305)
* Add equals_or_includes_any? helper in JsonLdHelper

* Support arrays in JSON-LD type fields for actors/tags/objects.

* Spec for resolving accounts with extension types

* Style tweaks for codeclimate
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/resolve_account_service_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/services/resolve_account_service_spec.rb b/spec/services/resolve_account_service_spec.rb
index 5f1b4467b..84dfe578a 100644
--- a/spec/services/resolve_account_service_spec.rb
+++ b/spec/services/resolve_account_service_spec.rb
@@ -105,6 +105,20 @@ RSpec.describe ResolveAccountService do
       expect(account.inbox_url).to eq 'https://ap.example.com/users/foo/inbox'
     end
 
+    context 'with multiple types' do
+      before do
+        stub_request(:get, "https://ap.example.com/users/foo").to_return(request_fixture('activitypub-actor-individual.txt'))
+      end
+
+      it 'returns new remote account' do
+        account = subject.call('foo@ap.example.com')
+
+        expect(account.activitypub?).to eq true
+        expect(account.domain).to eq 'ap.example.com'
+        expect(account.inbox_url).to eq 'https://ap.example.com/users/foo/inbox'
+      end
+    end
+
     pending
   end