Sha256: ae27728bec9383d0a45ee1320a0bb38db4e61fc0c02223a1464699d386c25754

Contents?: true

Size: 794 Bytes

Versions: 15

Compression:

Stored size: 794 Bytes

Contents

require 'spec_helper'

describe Conjur::Command::Users, logged_in: true do
  let(:update_password_url) { "https://authn.example.com/users/password" }
  
  context "updating password" do
    before do
     RestClient::Request.should_receive(:execute).with(
        method: :put,
        url: update_password_url,
        user: username, 
        password: api_key,
        headers: { },
        payload: "new-password"
      )
    end
    
    describe_command "user:update_password -p new-password" do
      it "PUTs the new password" do
        invoke
      end
    end
  
    describe_command "user:update_password" do
      it "PUTs the new password" do
        Conjur::Command::Users.should_receive(:prompt_for_password).and_return "new-password"

        invoke
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
conjur-cli-4.9.3 spec/command/users_spec.rb
conjur-cli-4.8.0 spec/command/users_spec.rb
conjur-cli-4.7.5 spec/command/users_spec.rb
conjur-cli-4.7.4 spec/command/users_spec.rb
conjur-cli-4.7.3 spec/command/users_spec.rb
conjur-cli-4.7.2 spec/command/users_spec.rb
conjur-cli-4.7.1 spec/command/users_spec.rb
conjur-cli-4.7.0 spec/command/users_spec.rb
conjur-cli-4.6.1 spec/command/users_spec.rb
conjur-cli-4.5.1 spec/command/users_spec.rb
conjur-cli-4.5.0 spec/command/users_spec.rb
conjur-cli-4.4.0 spec/command/users_spec.rb
conjur-cli-4.3.0 spec/command/users_spec.rb
conjur-cli-4.1.1 spec/command/users_spec.rb
conjur-cli-4.1.0 spec/command/users_spec.rb