Sha256: 04cea34168bd0dcaa331b863f76b0d2fef0515cf9aa435c58941c0f150ff5b8c

Contents?: true

Size: 665 Bytes

Versions: 5

Compression:

Stored size: 665 Bytes

Contents

require_relative "../../../spec_helper"
require "kontena/cli/stacks/deploy_command"

describe Kontena::Cli::Stacks::DeployCommand do

  include ClientHelpers

  describe '#execute' do
    it 'requires api url' do
      expect(described_class.requires_current_master?).to be_truthy
      subject.run(['test-stack'])
    end

    it 'requires token' do
      expect(described_class.requires_current_master_token?).to be_truthy
      subject.run(['test-stack'])
    end

    it 'sends deploy command to master' do
      expect(client).to receive(:post).with(
        'stacks/test-grid/test-stack/deploy', {}
      )
      subject.run(['test-stack'])
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
kontena-cli-1.0.0 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.0.0.rc2 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.0.0.rc1 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.0.0.pre4 spec/kontena/cli/stacks/deploy_command_spec.rb
kontena-cli-1.0.0.pre3 spec/kontena/cli/stacks/deploy_command_spec.rb