diff options
Diffstat (limited to 'spec/services/service_response_spec.rb')
-rw-r--r-- | spec/services/service_response_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/services/service_response_spec.rb b/spec/services/service_response_spec.rb index 6171ca1a8a6..03fcc11b6bd 100644 --- a/spec/services/service_response_spec.rb +++ b/spec/services/service_response_spec.rb @@ -214,4 +214,17 @@ RSpec.describe ServiceResponse, feature_category: :shared do end end end + + describe '#deconstruct_keys' do + it 'supports pattern matching' do + status = + case described_class.error(message: 'Bad apple') + in { status: Symbol => status } + status + else + raise + end + expect(status).to eq(:error) + end + end end |