about summary refs log tree commit diff
path: root/spec/services/activitypub/fetch_remote_status_service_spec.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-12-19 16:07:21 +0100
committerGitHub <noreply@github.com>2019-12-19 16:07:21 +0100
commitf064cd4fb8057af04f0f1db6a98fc45935811e25 (patch)
tree33375e965ba16e3491f3bc3cd733ff2331a48220 /spec/services/activitypub/fetch_remote_status_service_spec.rb
parent66ab1f83b0d342341181e0c88da83c966391fc0c (diff)
parentdace054c0680b3ac6e0da31f3ffa501cd8840fbf (diff)
Merge pull request #1255 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'spec/services/activitypub/fetch_remote_status_service_spec.rb')
-rw-r--r--spec/services/activitypub/fetch_remote_status_service_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/services/activitypub/fetch_remote_status_service_spec.rb b/spec/services/activitypub/fetch_remote_status_service_spec.rb
index 78dd59e3b..1ecc46952 100644
--- a/spec/services/activitypub/fetch_remote_status_service_spec.rb
+++ b/spec/services/activitypub/fetch_remote_status_service_spec.rb
@@ -104,6 +104,26 @@ RSpec.describe ActivityPub::FetchRemoteStatusService, type: :service do
       end
     end
 
+    context 'with Event object' do
+      let(:object) do
+        {
+          '@context': 'https://www.w3.org/ns/activitystreams',
+          id: "https://#{valid_domain}/@foo/1234",
+          type: 'Event',
+          name: "Let's change the world",
+          attributedTo: ActivityPub::TagManager.instance.uri_for(sender)
+        }
+      end
+
+      it 'creates status' do
+        status = sender.statuses.first
+
+        expect(status).to_not be_nil
+        expect(status.url).to eq "https://#{valid_domain}/@foo/1234"
+        expect(strip_tags(status.text)).to eq "Let's change the world https://#{valid_domain}/@foo/1234"
+      end
+    end
+
     context 'with wrong id' do
       let(:note) do
         {