Sha256: 388909d14b5e274c4bf3708ed97dd215529b5d23d96768450d98b53fbbca0e3a
Contents?: true
Size: 884 Bytes
Versions: 56
Compression:
Stored size: 884 Bytes
Contents
require "kontena/cli/grids/trusted_subnet_command" require "kontena/cli/grids/trusted_subnets/list_command" describe Kontena::Cli::Grids::TrustedSubnets::ListCommand do include ClientHelpers include RequirementsHelper expect_to_require_current_master describe '#execute' do it 'requests grid details from master' do expect(client).to receive(:get).with("grids/test-grid").and_return('trusted_subnets' => [ '192.168.0.1/24', ]) expect{subject.run([])}.to output("192.168.0.1/24\n").to_stdout end it 'supports the --grid option' do allow(subject).to receive(:current_grid).and_call_original expect(client).to receive(:get).with("grids/ingrid").and_return('trusted_subnets' => [ '192.168.0.1/24', ]) expect{subject.run(['--grid', 'ingrid'])}.to output("192.168.0.1/24\n").to_stdout end end end
Version data entries
56 entries across 56 versions & 1 rubygems