Sha256: 5a27018d94460e0302a5fa4255be6bdd386a1eab48399cfe5d3d05f7ef26c9ea
Contents?: true
Size: 979 Bytes
Versions: 1
Compression:
Stored size: 979 Bytes
Contents
require 'spec_helper' describe WebFinger::Response do let(:_subject_) { 'acct:nov@matake.jp' } let(:aliases) { ['mailto:nov@matake.jp'] } let(:properties) do {'http://webfinger.net/rel/name' => 'Nov Matake'} end let(:links) do [{ rel: 'http://openid.net/specs/connect/1.0/issuer', href: 'https://openid.example.com/' }] end subject do WebFinger::Response.new( subject: _subject_, aliases: aliases, properties: properties, links: links ) end its(:subject) { should == _subject_ } its(:aliases) { should == aliases } its(:properties) { should == properties } its(:links) { should == links } describe '#link_for' do context 'when unknown' do it do subject.link_for('unknown').should be_nil end end context 'otherwise' do it do subject.link_for('http://openid.net/specs/connect/1.0/issuer').should == links.first end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
webfinger-0.0.3 | spec/webfinger/response_spec.rb |