diff --git a/spec/requests/reports_spec.rb b/spec/requests/reports_spec.rb index e0d61d0..ce636ba 100644 --- a/spec/requests/reports_spec.rb +++ b/spec/requests/reports_spec.rb @@ -3,7 +3,7 @@ let(:report_body) { <<-EOF { - "@context":"https://www.w3.org/ns/activitystreams", + "@context":"https://www.w3.org/ns/activitystreams", "id":"https://mastodon.me.uk/d977f377-214b-4efd-8a47-70a37fb7ea20", "type":"Flag", "actor":"https://mastodon.me.uk/actor", @@ -15,6 +15,11 @@ EOF } + it "should accept Flag activities" do + post user.actor.inbox_url, params: report_body, headers: { content_type: "application/activity" } + expect(response.status).to be :created + end + it "should call registered Report handler when a flag is received by Federails" do expect(Federails::Moderation::Report).to receive(:handle_flag).once.and_call_original post user.actor.inbox_url, params: report_body, headers: { content_type: "application/activity" }