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.0.0.pre1 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-0.17.0.pre5 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-0.17.0.pre4 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-0.17.0.pre3 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-0.17.0.pre2 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-0.17.0.pre1 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-0.16.3 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-0.16.3.rc1 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-0.16.2 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-0.16.2.rc1 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-0.16.1 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-0.16.1.rc3 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-0.16.1.rc2 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-0.16.1.rc1 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-0.16.0 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-0.16.0.rc3 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-0.16.0.rc2 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-0.16.0.rc1 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-0.16.0.pre9 spec/kontena/cli/master/users/roles/remove_command_spec.rb
kontena-cli-0.16.0.pre8 spec/kontena/cli/master/users/roles/remove_command_spec.rb