Sha256: cc295b35f5f84e34b8dff72a4854b988ccafcdb0dfc963edbda5b53119b81340

Contents?: true

Size: 608 Bytes

Versions: 67

Compression:

Stored size: 608 Bytes

Contents

require 'kontena/cli/master/user_command'
require 'kontena/cli/master/user/role/add_command'

describe Kontena::Cli::Master::User::Role::AddCommand do

  include ClientHelpers

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

  describe "#add-role" do
    it 'makes add role request for all given users' do
      expect(client).to receive(:post).with("users/john@example.org/roles", {role: 'role'}).once
      expect(client).to receive(:post).with("users/jane@example.org/roles", {role: 'role'}).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.3.4.rc1 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.3.3 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.3.3.rc1 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.3.2 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.3.2.rc2 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.3.2.rc1 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.3.1 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.3.1.rc2 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.3.1.rc1 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.3.0 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.3.0.rc4 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.3.0.rc3 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.3.0.rc2 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.3.0.rc1 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.3.0.pre2 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.3.0.pre1 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.2.2 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.2.2.rc2 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.2.2.rc1 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.2.1 spec/kontena/cli/master/user/role/add_command_spec.rb