Sha256: 30c3c425121df2df8a925766cf9bf5091173e42b39b7e4ab3d9c86d24bb023cf
Contents?: true
Size: 741 Bytes
Versions: 69
Compression:
Stored size: 741 Bytes
Contents
require 'kontena/cli/master/current_command' describe Kontena::Cli::Master::CurrentCommand do include ClientHelpers let(:subject) { described_class.new(File.basename($0)) } describe '#execute' do it 'puts master name and URL' do expect{subject.run([])}.to output(/alias.*someurl/).to_stdout end it 'only outputs name if name-flag is set' do expect{subject.run(['--name'])}.to output("alias\n").to_stdout end it 'does not raise error when logged in' do expect{subject.run([])}.not_to exit_with_error end it 'raises error when not logged in' do expect(subject.config).to receive(:current_master).and_return(nil) expect{subject.run([])}.to exit_with_error end end end
Version data entries
69 entries across 69 versions & 1 rubygems