spec/jwt/verify_spec.rb in jwt-1.5.5 vs spec/jwt/verify_spec.rb in jwt-1.5.6

- old
+ new

@@ -44,9 +44,22 @@ end it 'must allow an array with any value matching the one in the options with a string options key' do Verify.verify_aud(array_payload, options.merge('aud' => array_aud.first)) end + + it 'should allow strings or symbolds in options array' do + options['aud'] = [ + 'ruby-jwt-aud', + 'test-aud', + 'ruby-ruby-ruby', + :test + ] + + array_payload['aud'].push('test') + + Verify.verify_aud(array_payload, options) + end end context '.verify_expiration(payload, options)' do let(:leeway) { 10 } let(:payload) { base_payload.merge('exp' => (Time.now.to_i - 5)) }