diff options
Diffstat (limited to 'spec/services/subscribe_service_spec.rb')
-rw-r--r-- | spec/services/subscribe_service_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/services/subscribe_service_spec.rb b/spec/services/subscribe_service_spec.rb index 01cdb29c0..5db91ad99 100644 --- a/spec/services/subscribe_service_spec.rb +++ b/spec/services/subscribe_service_spec.rb @@ -35,4 +35,9 @@ RSpec.describe SubscribeService do stub_request(:post, 'http://hub.example.com/').to_return(status: 503) expect { subject.call(account) }.to raise_error(/Subscription attempt failed/) end + + it 'fails loudly if rate limited' do + stub_request(:post, 'http://hub.example.com/').to_return(status: 429) + expect { subject.call(account) }.to raise_error(/Subscription attempt failed/) + end end |