Sha256: 791d81c2a48494d9cc991ff892cc925a63cf9529618ac967c1c7cd75c3346978

Contents?: true

Size: 563 Bytes

Versions: 117

Compression:

Stored size: 563 Bytes

Contents

module Ddr::Auth
  RSpec.describe DetachedAuthContext do

    subject { described_class.new(user, nil) }

    let(:user) { FactoryGirl.build(:user) }

    it_behaves_like "an auth context"

    before do
      allow(subject).to receive(:ldap_result) do
        double(affiliation: ["staff", "student"], ismemberof: ["group1", "group2", "group3"])
      end
    end

    its(:affiliation) { should contain_exactly("staff", "student") }
    its(:ismemberof) { should contain_exactly("group1", "group2", "group3") }
    its(:ip_address) { should be_nil }

  end
end

Version data entries

117 entries across 117 versions & 1 rubygems

Version Path
ddr-models-2.6.2 spec/auth/detached_auth_context_spec.rb
ddr-models-2.6.1 spec/auth/detached_auth_context_spec.rb
ddr-models-2.6.0 spec/auth/detached_auth_context_spec.rb
ddr-models-2.6.0.rc4 spec/auth/detached_auth_context_spec.rb
ddr-models-2.6.0.rc3 spec/auth/detached_auth_context_spec.rb
ddr-models-2.6.0.rc2 spec/auth/detached_auth_context_spec.rb
ddr-models-2.6.0.rc1 spec/auth/detached_auth_context_spec.rb
ddr-models-2.5.3 spec/auth/detached_auth_context_spec.rb
ddr-models-2.5.2 spec/auth/detached_auth_context_spec.rb
ddr-models-2.5.1 spec/auth/detached_auth_context_spec.rb
ddr-models-2.5.0 spec/auth/detached_auth_context_spec.rb
ddr-models-2.5.0.rc1 spec/auth/detached_auth_context_spec.rb
ddr-models-2.4.16 spec/auth/detached_auth_context_spec.rb
ddr-models-2.4.15 spec/auth/detached_auth_context_spec.rb
ddr-models-2.4.14 spec/auth/detached_auth_context_spec.rb
ddr-models-2.4.13 spec/auth/detached_auth_context_spec.rb
ddr-models-2.4.12 spec/auth/detached_auth_context_spec.rb
ddr-models-2.4.11 spec/auth/detached_auth_context_spec.rb
ddr-models-3.0.8 spec/auth/detached_auth_context_spec.rb
ddr-models-3.0.7 spec/auth/detached_auth_context_spec.rb