From f6bbd046e93ca14959b84956e46d21c1c3d8cb30 Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Thu, 15 Feb 2024 15:20:56 +0900 Subject: [PATCH] Let test raise connection error instead of returning 500 --- spec/lib/activitypub/activity/create_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/lib/activitypub/activity/create_spec.rb b/spec/lib/activitypub/activity/create_spec.rb index 80bdce49bac..5beb47830c8 100644 --- a/spec/lib/activitypub/activity/create_spec.rb +++ b/spec/lib/activitypub/activity/create_spec.rb @@ -137,7 +137,7 @@ RSpec.describe ActivityPub::Activity::Create do end it 'ignores unprocessable mention', :aggregate_failures do - stub_request(:get, invalid_mention_json[:tag][:href]).to_return(status: 500) + stub_request(:get, invalid_mention_json[:tag][:href]).to_raise(HTTP::ConnectionError) # When receiving the post that contains an invalid mention… described_class.new(activity_for_object(invalid_mention_json), sender, delivery: true).perform