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-3.0.0.beta.17 spec/auth/detached_auth_context_spec.rb
ddr-models-3.0.0.beta.16 spec/auth/detached_auth_context_spec.rb
ddr-models-3.0.0.beta.15 spec/auth/detached_auth_context_spec.rb
ddr-models-3.0.0.beta.14 spec/auth/detached_auth_context_spec.rb
ddr-models-3.0.0.beta.13 spec/auth/detached_auth_context_spec.rb
ddr-models-3.0.0.beta.12 spec/auth/detached_auth_context_spec.rb
ddr-models-3.0.0.beta.11 spec/auth/detached_auth_context_spec.rb
ddr-models-2.4.7 spec/auth/detached_auth_context_spec.rb
ddr-models-2.4.6 spec/auth/detached_auth_context_spec.rb
ddr-models-2.4.5 spec/auth/detached_auth_context_spec.rb
ddr-models-3.0.0.beta.10 spec/auth/detached_auth_context_spec.rb
ddr-models-3.0.0.beta.9 spec/auth/detached_auth_context_spec.rb
ddr-models-3.0.0.beta.8 spec/auth/detached_auth_context_spec.rb
ddr-models-3.0.0.beta.7 spec/auth/detached_auth_context_spec.rb
ddr-models-2.4.4 spec/auth/detached_auth_context_spec.rb
ddr-models-3.0.0.beta.6 spec/auth/detached_auth_context_spec.rb
ddr-models-2.4.3 spec/auth/detached_auth_context_spec.rb
ddr-models-2.4.2 spec/auth/detached_auth_context_spec.rb
ddr-models-3.0.0.beta.4 spec/auth/detached_auth_context_spec.rb
ddr-models-2.4.1 spec/auth/detached_auth_context_spec.rb