Sha256: f26e2218a3f5069b6f285378a052dc39bce7a329d9ce1b95538b4f2301589637

Contents?: true

Size: 995 Bytes

Versions: 375

Compression:

Stored size: 995 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 #{File.basename $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 #{File.basename $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_TOKEN=token travis whoami" do
    ENV['TRAVIS_TOKEN'] = 'token'
    run_cli('whoami').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 rkh (Konstantin Haase)\n"
    stderr.should be_empty
  end
end

Version data entries

375 entries across 375 versions & 3 rubygems

Version Path
travis-1.11.1 spec/cli/whoami_spec.rb
travis-1.11.0 spec/cli/whoami_spec.rb
travis-1.10.1.travis.1341.9 spec/cli/whoami_spec.rb
travis-1.10.1.travis.1321.9 spec/cli/whoami_spec.rb
travis-1.10.1.travis.1312.9 spec/cli/whoami_spec.rb
travis-1.10.1.travis.1311.9 spec/cli/whoami_spec.rb
travis-1.10.1.travis.1305.9 spec/cli/whoami_spec.rb
travis-1.10.0 spec/cli/whoami_spec.rb
travis-1.9.2.travis.1304.9 spec/cli/whoami_spec.rb
travis-1.9.2.travis.1303.9 spec/cli/whoami_spec.rb
travis-1.10.0.pre.rc4 spec/cli/whoami_spec.rb
travis-1.10.0.pre.rc3 spec/cli/whoami_spec.rb
travis-1.10.0.pre.rc2 spec/cli/whoami_spec.rb
travis-1.9.2.travis.1288.9 spec/cli/whoami_spec.rb
travis-1.9.2.travis.1285.9 spec/cli/whoami_spec.rb
travis-1.9.2.travis.1279.9 spec/cli/whoami_spec.rb
travis-1.10.0.pre.rc1 spec/cli/whoami_spec.rb
travis-1.9.2.travis.1254.9 spec/cli/whoami_spec.rb
travis-1.9.2.travis.1236.9 spec/cli/whoami_spec.rb
travis-1.9.2.travis.1224.9 spec/cli/whoami_spec.rb