Sha256: c1114a6e9fe7b8a7cdc6766690cba00e57d7d490a4665decce025fc0e90dff7e

Contents?: true

Size: 663 Bytes

Versions: 6

Compression:

Stored size: 663 Bytes

Contents

require 'spec_helper'

describe Conjur::Command::LDAPSync, logged_in: true do

  let (:policy_response) { { 'ok' => true, 'events' => [], 'policy' => <<eop
"---
- !user
  annotations:
    ldap-sync/source: ldap-server:389
    ldap-sync/upstream-dn: CN=Administrator,OU=functest,OU=testdata,OU=dev-ci,DC=dev-ci,DC=conjur
  id: Administrator
  uidnumber:"}
eop
  }
}

  describe_command "ldap-sync policy show" do
    
    before do 
      expect_any_instance_of(Conjur::API).to receive(:ldap_sync_policy).with('default').and_return policy_response
    end

    it "shows the policy" do
      expect { invoke }.to write policy_response['policy']
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
conjur-cli-5.6.6 spec/command/ldapsync_spec.rb
conjur-cli-5.6.5 spec/command/ldapsync_spec.rb
conjur-cli-5.6.4 spec/command/ldapsync_spec.rb
conjur-cli-5.6.3 spec/command/ldapsync_spec.rb
conjur-cli-5.5.0 spec/command/ldapsync_spec.rb
conjur-cli-5.4.0 spec/command/ldapsync_spec.rb