Sha256: c2624358d558959c38b88f564952ff7b0ac450ba596b1eb5676812c5fb8f119f

Contents?: true

Size: 751 Bytes

Versions: 39

Compression:

Stored size: 751 Bytes

Contents

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

describe Kontena::Cli::Stacks::ShowCommand do

  include ClientHelpers

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

    it 'requires token' do
      allow(subject).to receive(:forced?).and_return(true)
      expect(described_class.requires_current_master_token?).to be_truthy
      subject.run(['test-stack'])
    end

    it 'fetches stack info from master' do
      expect(client).to receive(:get).with('stacks/test-grid/test-stack')
      subject.run(['test-stack'])
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
kontena-cli-1.1.6 spec/kontena/cli/stacks/show_command_spec.rb
kontena-cli-1.1.5 spec/kontena/cli/stacks/show_command_spec.rb
kontena-cli-1.1.5.rc3 spec/kontena/cli/stacks/show_command_spec.rb
kontena-cli-1.1.5.rc2 spec/kontena/cli/stacks/show_command_spec.rb
kontena-cli-1.1.5.rc1 spec/kontena/cli/stacks/show_command_spec.rb
kontena-cli-1.1.4 spec/kontena/cli/stacks/show_command_spec.rb
kontena-cli-1.1.3 spec/kontena/cli/stacks/show_command_spec.rb
kontena-cli-1.1.2 spec/kontena/cli/stacks/show_command_spec.rb
kontena-cli-1.1.2.rc2 spec/kontena/cli/stacks/show_command_spec.rb
kontena-cli-1.1.2.rc1 spec/kontena/cli/stacks/show_command_spec.rb
kontena-cli-1.1.1 spec/kontena/cli/stacks/show_command_spec.rb
kontena-cli-1.1.1.rc1 spec/kontena/cli/stacks/show_command_spec.rb
kontena-cli-1.1.0 spec/kontena/cli/stacks/show_command_spec.rb
kontena-cli-1.1.0.rc2 spec/kontena/cli/stacks/show_command_spec.rb
kontena-cli-1.1.0.rc1 spec/kontena/cli/stacks/show_command_spec.rb
kontena-cli-1.1.0.pre1 spec/kontena/cli/stacks/show_command_spec.rb
kontena-cli-1.0.6 spec/kontena/cli/stacks/show_command_spec.rb
kontena-cli-1.0.6.rc1 spec/kontena/cli/stacks/show_command_spec.rb
kontena-cli-1.0.5 spec/kontena/cli/stacks/show_command_spec.rb
kontena-cli-1.0.5.rc1 spec/kontena/cli/stacks/show_command_spec.rb