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.1.1 spec/auth/detached_auth_context_spec.rb
ddr-models-2.1.0 spec/auth/detached_auth_context_spec.rb
ddr-models-2.1.0.rc2 spec/auth/detached_auth_context_spec.rb
ddr-models-2.1.0.rc1 spec/auth/detached_auth_context_spec.rb
ddr-models-2.0.1 spec/auth/detached_auth_context_spec.rb
ddr-models-2.0.0 spec/auth/detached_auth_context_spec.rb
ddr-models-2.0.0.rc6 spec/auth/detached_auth_context_spec.rb
ddr-models-2.0.0.rc5 spec/auth/detached_auth_context_spec.rb
ddr-models-2.0.0.rc4 spec/auth/detached_auth_context_spec.rb
ddr-models-2.0.0.rc3 spec/auth/detached_auth_context_spec.rb
ddr-models-2.0.0.rc2 spec/auth/detached_auth_context_spec.rb
ddr-models-2.0.0.rc1 spec/auth/detached_auth_context_spec.rb
ddr-models-2.0.0.pre.5 spec/auth/detached_auth_context_spec.rb
ddr-models-2.0.0.pre.4 spec/auth/detached_auth_context_spec.rb
ddr-models-2.0.0.pre.3 spec/auth/detached_auth_context_spec.rb
ddr-models-2.0.0.pre.2 spec/auth/detached_auth_context_spec.rb
ddr-models-2.0.0.pre.1 spec/auth/detached_auth_context_spec.rb