diff options
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/reblog_service_spec.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/services/reblog_service_spec.rb b/spec/services/reblog_service_spec.rb index c00472229..fdf5ec923 100644 --- a/spec/services/reblog_service_spec.rb +++ b/spec/services/reblog_service_spec.rb @@ -38,7 +38,10 @@ RSpec.describe ReblogService, type: :service do let(:status) { Fabricate(:status, account: alice, visibility: :public) } before do - status.discard + # Update the in-database attribute without reflecting the change in + # the object. This cannot simulate all race conditions, but it is + # pretty close. + Status.where(id: status.id).update_all(deleted_at: Time.now.utc) # rubocop:disable Rails/SkipsModelValidations end it 'raises an exception' do |