Sha256: 0ce25ce3c08ab612c0e7b4fc17de6012a208ed40fbc5a7a5994420af0c46b679

Contents?: true

Size: 790 Bytes

Versions: 67

Compression:

Stored size: 790 Bytes

Contents

require_relative "../../../../../spec_helper"
require 'kontena/cli/master/users_command'
require 'kontena/cli/master/users/roles/remove_command'

describe Kontena::Cli::Master::Users::Roles::RemoveCommand do

  include ClientHelpers

  let(:subject) do
    described_class.new(File.basename($0))
  end

  describe "#remove-role" do
    before(:each) do
      allow(subject).to receive(:confirm).and_return(true)
    end

    it 'makes remove role request for all given users' do
      expect(client).to receive(:delete).with("users/john@example.org/roles/role").once
      expect(client).to receive(:delete).with("users/jane@example.org/roles/role").once
      expect(subject).to receive(:confirm).once

      subject.run(['role', 'john@example.org', 'jane@example.org'])
    end
  end
end

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
kontena-cli-1.1.6 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-1.1.5 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-1.1.5.rc3 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-1.1.5.rc2 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-1.1.5.rc1 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-1.1.4 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-1.1.3 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-1.1.2 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-1.1.2.rc2 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-1.1.2.rc1 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-1.1.1 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-1.1.1.rc1 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-1.1.0 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-1.1.0.rc2 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-1.1.0.rc1 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-1.1.0.pre1 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-1.0.6 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-1.0.6.rc1 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-1.0.5 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-1.0.5.rc1 spec/kontena/cli/master/users/roles/remove_command_spec.rb