Sha256: bb9b88b3faa5c3a7a63dbfec145ed20ebda99a935ee745bb0b8385e43fbc5749

Contents?: true

Size: 645 Bytes

Versions: 20

Compression:

Stored size: 645 Bytes

Contents

require 'spec_helper'

describe Conjur::Command::Authn do
  context logged_in: false do
    describe_command 'authn:whoami' do
      it "errors out" do
        expect { invoke }.to raise_error(GLI::CustomExit, /not logged in/i)
      end
    end
  end

  context logged_in: true do
    describe_command 'authn:logout' do
      it "deletes credentials" do
        invoke
        netrc[authn_host].should_not be
      end
    end

    describe_command 'authn:whoami' do
      it "prints the current account and username to stdout" do
        expect { invoke }.to write({ account: account, username: username }.to_json)
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
conjur-cli-4.9.3 spec/command/authn_spec.rb
conjur-cli-4.8.0 spec/command/authn_spec.rb
conjur-cli-4.7.5 spec/command/authn_spec.rb
conjur-cli-4.7.4 spec/command/authn_spec.rb
conjur-cli-4.7.3 spec/command/authn_spec.rb
conjur-cli-4.7.2 spec/command/authn_spec.rb
conjur-cli-4.7.1 spec/command/authn_spec.rb
conjur-cli-4.7.0 spec/command/authn_spec.rb
conjur-cli-4.6.1 spec/command/authn_spec.rb
conjur-cli-4.5.1 spec/command/authn_spec.rb
conjur-cli-4.5.0 spec/command/authn_spec.rb
conjur-cli-4.4.0 spec/command/authn_spec.rb
conjur-cli-4.3.0 spec/command/authn_spec.rb
conjur-cli-4.1.1 spec/command/authn_spec.rb
conjur-cli-4.1.0 spec/command/authn_spec.rb
conjur-cli-2.6.0 spec/command/authn_spec.rb
conjur-cli-2.4.1 spec/command/authn_spec.rb
conjur-cli-2.4.0 spec/command/authn_spec.rb
conjur-cli-2.3.0 spec/command/authn_spec.rb
conjur-cli-2.2.1 spec/command/authn_spec.rb