Add test for reblog race condition fix (#17732)
Follow-up to #17693remotes/1727458204337373841/tmp_refs/heads/signup-info-prompt
parent
63c9d2bc28
commit
5ccd6cbfda
|
@ -32,6 +32,18 @@ RSpec.describe ReblogService, type: :service do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'when the reblogged status is discarded in the meantime' do
|
||||||
|
let(:status) { Fabricate(:status, account: alice, visibility: :public) }
|
||||||
|
|
||||||
|
before do
|
||||||
|
status.discard
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'raises an exception' do
|
||||||
|
expect { subject.call(alice, status) }.to raise_error ActiveRecord::ActiveRecordError
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
context 'ActivityPub' do
|
context 'ActivityPub' do
|
||||||
let(:bob) { Fabricate(:account, username: 'bob', protocol: :activitypub, domain: 'example.com', inbox_url: 'http://example.com/inbox') }
|
let(:bob) { Fabricate(:account, username: 'bob', protocol: :activitypub, domain: 'example.com', inbox_url: 'http://example.com/inbox') }
|
||||||
let(:status) { Fabricate(:status, account: bob) }
|
let(:status) { Fabricate(:status, account: bob) }
|
||||||
|
|
Loading…
Reference in New Issue