Skip to content

Commit

Permalink
Change validation for starting registration
Browse files Browse the repository at this point in the history
  • Loading branch information
gionaufal committed Aug 7, 2019
1 parent 9bc7691 commit ec1223a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion lib/suse/connect/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def execute! # rubocop:disable MethodLength, CyclomaticComplexity, PerceivedComp
elsif @config.token && @config.instance_data_file
log.error 'Please use either --regcode or --instance-data'
exit(1)
elsif @config.url_default? && !@config.token && !status.activated_base_product?
elsif @config.url_default? && !@config.token && !@config.product
puts @opts
exit(1)
else
Expand Down
1 change: 0 additions & 1 deletion spec/connect/cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@

context 'when the system has no activated base product' do
it 'shows a properly rendered help page' do
expect_any_instance_of(Status).to receive(:activated_base_product?).and_return(false)
expect_any_instance_of(Client).not_to receive(:register!)
expect_any_instance_of(described_class).to receive(:puts) do |option_parser|
expect(option_parser.instance_variable_get(:@opts).to_s.split("\n").map(&:length)).to all be <= 80
Expand Down

0 comments on commit ec1223a

Please sign in to comment.