Sha256: a31cecd9fd9b7c1d2282445f8eab59b0b18a8ef0a8ea16b500fb6fd0796a6633

Contents?: true

Size: 1012 Bytes

Versions: 41

Compression:

Stored size: 1012 Bytes

Contents

require 'kontena/cli/master/join_command'
require 'kontena/cli/localhost_web_server'
require 'launchy'
require 'ostruct'

describe Kontena::Cli::Master::JoinCommand do

  include ClientHelpers

  let(:subject) do
    described_class.new(File.basename($0))
  end

  it 'calls master login with proper join options' do
    expect(Kontena).to receive(:run!).with(%w(master login --join xyz someurl))
    subject.run(%w(someurl xyz))
  end

  it 'calls master login with remote option' do
    expect(Kontena).to receive(:run!).with(%w(master login --join xyz --remote someurl))
    subject.run(%w(--remote someurl xyz))
  end

  it 'calls master login with name option' do
    expect(Kontena).to receive(:run!).with(%w(master login --join xyz --name somename someurl))
    subject.run(%w(--name somename someurl xyz))
  end

  it 'calls master login with verbose option' do
    expect(Kontena).to receive(:run!).with(%w(master login --join xyz --verbose someurl))
    subject.run(%w(--verbose someurl xyz))
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
kontena-cli-1.4.3 spec/kontena/cli/master/join_command_spec.rb
kontena-cli-1.4.3.rc1 spec/kontena/cli/master/join_command_spec.rb
kontena-cli-1.4.2 spec/kontena/cli/master/join_command_spec.rb
kontena-cli-1.4.2.rc1 spec/kontena/cli/master/join_command_spec.rb
kontena-cli-1.4.2.pre1 spec/kontena/cli/master/join_command_spec.rb
kontena-cli-1.4.1 spec/kontena/cli/master/join_command_spec.rb
kontena-cli-1.4.1.rc1 spec/kontena/cli/master/join_command_spec.rb
kontena-cli-1.4.1.pre1 spec/kontena/cli/master/join_command_spec.rb
kontena-cli-1.3.5 spec/kontena/cli/master/join_command_spec.rb
kontena-cli-1.3.5.rc1 spec/kontena/cli/master/join_command_spec.rb
kontena-cli-1.4.0 spec/kontena/cli/master/join_command_spec.rb
kontena-cli-1.4.0.rc2 spec/kontena/cli/master/join_command_spec.rb
kontena-cli-1.4.0.rc1 spec/kontena/cli/master/join_command_spec.rb
kontena-cli-1.4.0.pre14 spec/kontena/cli/master/join_command_spec.rb
kontena-cli-1.4.0.pre13 spec/kontena/cli/master/join_command_spec.rb
kontena-cli-1.4.0.pre12 spec/kontena/cli/master/join_command_spec.rb
kontena-cli-1.4.0.pre11 spec/kontena/cli/master/join_command_spec.rb
kontena-cli-1.4.0.pre10 spec/kontena/cli/master/join_command_spec.rb
kontena-cli-1.4.0.pre9 spec/kontena/cli/master/join_command_spec.rb
kontena-cli-1.4.0.pre8 spec/kontena/cli/master/join_command_spec.rb