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.11.0 spec/auth/detached_auth_context_spec.rb
ddr-models-2.10.2 spec/auth/detached_auth_context_spec.rb
ddr-models-2.10.1 spec/auth/detached_auth_context_spec.rb
ddr-models-2.10.0 spec/auth/detached_auth_context_spec.rb
ddr-models-2.10.0.rc2 spec/auth/detached_auth_context_spec.rb
ddr-models-2.10.0.rc1 spec/auth/detached_auth_context_spec.rb
ddr-models-2.9.2 spec/auth/detached_auth_context_spec.rb
ddr-models-2.9.1 spec/auth/detached_auth_context_spec.rb
ddr-models-2.9.0 spec/auth/detached_auth_context_spec.rb
ddr-models-2.9.0.rc1 spec/auth/detached_auth_context_spec.rb
ddr-models-2.8.0 spec/auth/detached_auth_context_spec.rb
ddr-models-2.8.0.rc1 spec/auth/detached_auth_context_spec.rb
ddr-models-2.7.6 spec/auth/detached_auth_context_spec.rb
ddr-models-2.7.5 spec/auth/detached_auth_context_spec.rb
ddr-models-2.7.4 spec/auth/detached_auth_context_spec.rb
ddr-models-2.7.3 spec/auth/detached_auth_context_spec.rb
ddr-models-2.7.2 spec/auth/detached_auth_context_spec.rb
ddr-models-2.7.1 spec/auth/detached_auth_context_spec.rb
ddr-models-2.7.0 spec/auth/detached_auth_context_spec.rb
ddr-models-2.7.0.rc1 spec/auth/detached_auth_context_spec.rb