1
0
mirror of https://github.com/mastodon/mastodon synced 2024-11-24 07:06:18 +09:00

Add test ensuring that unknown object types are rejected (#10166)

This commit is contained in:
Eugen Rochko 2019-03-05 03:46:36 +01:00 committed by Yamagishi Kazutoshi
parent 5d3e7cee99
commit 0a39c81dd8

View File

@ -28,6 +28,20 @@ RSpec.describe ActivityPub::Activity::Create do
subject.perform
end
context 'unknown object type' do
let(:object_json) do
{
id: [ActivityPub::TagManager.instance.uri_for(sender), '#bar'].join,
type: 'Banana',
content: 'Lorem ipsum',
}
end
it 'does not create a status' do
expect(sender.statuses.count).to be_zero
end
end
context 'standalone' do
let(:object_json) do
{