Sha256: cdfcba0bf1570d1812c50365ba3737fa2d9554ac10af8d14fe396e1eec2efa83

Contents?: true

Size: 774 Bytes

Versions: 37

Compression:

Stored size: 774 Bytes

Contents

require 'spec_helper'

describe "ey whoami" do
  given "integration"

  context "logged in" do
    before { login_scenario 'empty' }
    it "outputs the currently logged in user" do
      ey %w[whoami]
      @out.should include("User Name (#{scenario_email})")
    end
  end

  context "not logged in" do
    it "prompts for authentication before outputting the logged in user" do
      api_scenario 'empty'

      ey(%w[whoami], :hide_err => true) do |input|
        input.puts(scenario_email)
        input.puts(scenario_password)
      end

      @out.should include("We need to fetch your API token; please log in.")
      @out.should include("Email:")
      @out.should include("Password:")

      @out.should include("User Name (#{scenario_email})")
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
engineyard-2.0.10 spec/ey/whoami_spec.rb
engineyard-2.0.9 spec/ey/whoami_spec.rb
engineyard-2.0.8 spec/ey/whoami_spec.rb
engineyard-2.0.7 spec/ey/whoami_spec.rb
engineyard-2.0.6 spec/ey/whoami_spec.rb
engineyard-2.0.5 spec/ey/whoami_spec.rb
engineyard-2.0.4 spec/ey/whoami_spec.rb
engineyard-2.0.2 spec/ey/whoami_spec.rb
engineyard-2.0.1 spec/ey/whoami_spec.rb
engineyard-2.0.0 spec/ey/whoami_spec.rb
engineyard-2.0.0.rc1 spec/ey/whoami_spec.rb
engineyard-2.0.0.pre5.1 spec/ey/whoami_spec.rb
engineyard-2.0.0.pre4 spec/ey/whoami_spec.rb
engineyard-2.0.0.pre3 spec/ey/whoami_spec.rb
engineyard-2.0.0.pre2 spec/ey/whoami_spec.rb
engineyard-2.0.0.pre1 spec/ey/whoami_spec.rb
engineyard-1.7.0.pre2 spec/ey/whoami_spec.rb