Sha256: 7a4f0ad2603b4e48e3cf10eabfd5f745170052fdf70844d91f8cb4dda0957a76

Contents?: true

Size: 980 Bytes

Versions: 12

Compression:

Stored size: 980 Bytes

Contents

require 'spec_helper'
module SamlIdp
  describe NameIdFormatter do
    subject { described_class.new list }

    describe "with one item" do
      let(:list) { { email_address: ->() { "foo@example.com" } } }

      its(:all) { should == ["urn:oasis:names:tc:SAML:2.0:nameid-format:emailAddress"] }
    end

    describe "with hash describing versions" do
      let(:list) {
        {
          "1.1" => { email_address: -> {} },
          "2.0" => { undefined: -> {} },
        }
      }

      its(:all) {
        should == [
          "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress",
          "urn:oasis:names:tc:SAML:2.0:nameid-format:undefined",
        ]
      }
    end

    describe "with actual list" do
      let(:list) { [:email_address, :undefined] }

      its(:all) {
        should == [
          "urn:oasis:names:tc:SAML:2.0:nameid-format:emailAddress",
          "urn:oasis:names:tc:SAML:2.0:nameid-format:undefined",
        ]
      }
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
saml_idp-0.1.1 spec/lib/saml_idp/name_id_formatter_spec.rb
saml_idp-0.1.0 spec/lib/saml_idp/name_id_formatter_spec.rb
saml_idp-0.0.10 spec/lib/saml_idp/name_id_formatter_spec.rb
saml_idp-0.0.9 spec/lib/saml_idp/name_id_formatter_spec.rb
saml_idp-0.0.8 spec/lib/saml_idp/name_id_formatter_spec.rb
saml_idp-0.0.7 spec/lib/saml_idp/name_id_formatter_spec.rb
saml_idp-0.0.6 spec/lib/saml_idp/name_id_formatter_spec.rb
saml_idp-0.0.5 spec/lib/saml_idp/name_id_formatter_spec.rb
saml_idp-0.0.4 spec/lib/saml_idp/name_id_formatter_spec.rb
saml_idp-0.0.3 spec/lib/saml_idp/name_id_formatter_spec.rb
saml_idp-0.0.2 spec/lib/saml_idp/name_id_formatter_spec.rb
saml_idp-0.0.1 spec/lib/saml_idp/name_id_formatter_spec.rb