Sha256: 193dbd5632cd655d5a75df3cdf4f00e01e77f27e95a894209d0fdbd4a2b45d50

Contents?: true

Size: 779 Bytes

Versions: 25

Compression:

Stored size: 779 Bytes

Contents

require "kontena/cli/master/init_cloud_command"

describe Kontena::Cli::Master::InitCloudCommand do

  include ClientHelpers
  include RequirementsHelper

  mock_current_master

  let(:cloud_client) { double(:cc) }

  before(:each) do
    allow(subject).to receive(:current_account).and_return('foo')
    allow(subject).to receive(:cloud_auth?).and_return(true)
  end

  describe '#execute' do
    expect_to_require_current_master
    expect_to_require_current_master_token
  end

  it 'runs the invite self after deploy callback' do
    expect(Kontena).to receive(:run!).with(%w(cloud master add --current --force)).and_return(true)
    expect_any_instance_of(Kontena::Callbacks::InviteSelfAfterDeploy).to receive(:after).and_return(true)
    subject.run(['--force'])
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
kontena-cli-1.3.5 spec/kontena/cli/master/init_cloud_command_spec.rb
kontena-cli-1.3.5.rc1 spec/kontena/cli/master/init_cloud_command_spec.rb
kontena-cli-1.4.0.pre6 spec/kontena/cli/master/init_cloud_command_spec.rb
kontena-cli-1.4.0.pre5 spec/kontena/cli/master/init_cloud_command_spec.rb
kontena-cli-1.4.0.pre4 spec/kontena/cli/master/init_cloud_command_spec.rb
kontena-cli-1.4.0.pre3 spec/kontena/cli/master/init_cloud_command_spec.rb
kontena-cli-1.4.0.pre2 spec/kontena/cli/master/init_cloud_command_spec.rb
kontena-cli-1.4.0.pre1 spec/kontena/cli/master/init_cloud_command_spec.rb
kontena-cli-1.3.4 spec/kontena/cli/master/init_cloud_command_spec.rb
kontena-cli-1.3.4.rc1 spec/kontena/cli/master/init_cloud_command_spec.rb
kontena-cli-1.3.3 spec/kontena/cli/master/init_cloud_command_spec.rb
kontena-cli-1.3.3.rc1 spec/kontena/cli/master/init_cloud_command_spec.rb
kontena-cli-1.3.2 spec/kontena/cli/master/init_cloud_command_spec.rb
kontena-cli-1.3.2.rc2 spec/kontena/cli/master/init_cloud_command_spec.rb
kontena-cli-1.3.2.rc1 spec/kontena/cli/master/init_cloud_command_spec.rb
kontena-cli-1.3.1 spec/kontena/cli/master/init_cloud_command_spec.rb
kontena-cli-1.3.1.rc2 spec/kontena/cli/master/init_cloud_command_spec.rb
kontena-cli-1.3.1.rc1 spec/kontena/cli/master/init_cloud_command_spec.rb
kontena-cli-1.3.0 spec/kontena/cli/master/init_cloud_command_spec.rb
kontena-cli-1.3.0.rc4 spec/kontena/cli/master/init_cloud_command_spec.rb