Sha256: 54b37b3411ff8da4930feae4920c1719f8d73377a80f87884a144ca51f2595ea
Contents?: true
Size: 833 Bytes
Versions: 2
Compression:
Stored size: 833 Bytes
Contents
require 'spec_helper' describe JSON::JWK::Set do let(:jwk) { JSON::JWK.new public_key } context 'when single JWK given' do let(:set) { JSON::JWK::Set.new jwk } it 'should become proper JWK set format' do _set_ = set.as_json _set_.should include :keys _set_[:keys].should == [jwk] end end context 'when multiple JWKs given' do let(:set) { JSON::JWK::Set.new jwk, jwk } it 'should become proper JWK set format' do _set_ = set.as_json _set_.should include :keys _set_[:keys].should == [jwk, jwk] end end context 'when an Array of JWKs given' do let(:set) { JSON::JWK::Set.new [jwk, jwk] } it 'should become proper JWK set format' do _set_ = set.as_json _set_.should include :keys _set_[:keys].should == [jwk, jwk] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
json-jwt-0.1.4 | spec/json/jwk/set_spec.rb |
json-jwt-0.1.3 | spec/json/jwk/set_spec.rb |