diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-03-10 17:29:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-10 17:29:15 +0100 |
commit | 2c8bb1745359a3bf200d37383dc56d5951e2b6bc (patch) | |
tree | 6b22f1ab7e96c9223760de2a74dc1d4d985f7758 /spec/services/reblog_service_spec.rb | |
parent | 02133866e6915e37431298b396e1aded1e4c44c5 (diff) | |
parent | 43bce02a7ae78954be8857f547434c56ac59fa59 (diff) |
Merge pull request #1715 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'spec/services/reblog_service_spec.rb')
-rw-r--r-- | spec/services/reblog_service_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/services/reblog_service_spec.rb b/spec/services/reblog_service_spec.rb index e2077f282..c0ae5eedc 100644 --- a/spec/services/reblog_service_spec.rb +++ b/spec/services/reblog_service_spec.rb @@ -32,6 +32,18 @@ RSpec.describe ReblogService, type: :service do 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 let(:bob) { Fabricate(:account, username: 'bob', protocol: :activitypub, domain: 'example.com', inbox_url: 'http://example.com/inbox') } let(:status) { Fabricate(:status, account: bob) } |