Sha256: 29d97703f7b72134fd1d937801dfe673602b348fd01e9216123705486cf10fb8

Contents?: true

Size: 790 Bytes

Versions: 2

Compression:

Stored size: 790 Bytes

Contents

require 'spec_helper'

describe Travis::CLI::Whoami do
  example "travis whoami" do
    run_cli('whoami').should_not be_success
    stdout.should be_empty
    stderr.should be == "not logged in, please run #$0 login\n"
  end

  example "travis whoami --pro" do
    run_cli('whoami', '--pro').should_not be_success
    stdout.should be_empty
    stderr.should be == "not logged in, please run #$0 login --pro\n"
  end

  example "travis whoami -t token" do
    run_cli('whoami', '-t', 'token').should be_success
    stdout.should be == "rkh\n"
    stderr.should be_empty
  end

  example "travis whoami -t token -i" do
    run_cli('whoami', '-t', 'token', '-i').should be_success
    stdout.should be == "You are \e[1m\e[4mrkh\e[0m (Konstantin Haase)\n"
    stderr.should be_empty
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
travis-1.0.1 spec/cli/whoami_spec.rb
travis-1.0.0 spec/cli/whoami_spec.rb