Sha256: 64b2ad32fe9ba892d5bb2d85dc334156a4bca2f37fef5e3e1cf5261fcaa47aae
Contents?: true
Size: 587 Bytes
Versions: 4
Compression:
Stored size: 587 Bytes
Contents
require 'spec_helper' require 'apiture/swagger/specification' describe Apiture::Swagger::Specification do it "should serialize security node as key and scopes" do spec = described_class.new security = Apiture::Swagger::Security.new('oauth') security.scopes = ['email'] spec.security = [security] h = spec.serializable_hash security_list = h['security'] expect(security_list).to_not be_nil security = security_list.detect { |sec| sec.keys.first == 'oauth' } expect(security).to_not be_nil expect(security['oauth']).to eq ['email'] end end
Version data entries
4 entries across 4 versions & 1 rubygems