spec/kontena/cli/master/users/remove_command_spec.rb in kontena-cli-1.1.6 vs spec/kontena/cli/master/users/remove_command_spec.rb in kontena-cli-1.2.0.dev1

- old
+ new

@@ -1,6 +1,5 @@ -require_relative "../../../../spec_helper" require 'kontena/cli/master/users_command' require "kontena/cli/master/users/remove_command" describe Kontena::Cli::Master::Users::RemoveCommand do @@ -10,28 +9,17 @@ before(:each) do allow(subject).to receive(:confirm).and_return(true) end - it 'requires api url' do - expect(subject).to receive(:require_api_url).once - subject.run(['john@domain.com']) - end - it 'it requires confirmation' do expect(subject).to receive(:confirm).once + expect(client).to receive(:delete).with('users/john@domain.com') subject.run(['john@domain.com']) end - it 'requires token' do - expect(subject).to receive(:require_token).and_return(token) - subject.run(['john@domain.com']) - end - it 'sends email to master' do - expect(client).to receive(:delete).with( - 'users/john@domain.com' - ) + expect(client).to receive(:delete).with('users/john@domain.com') subject.run(['john@domain.com']) end end end