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.5.4 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.5.4.rc1 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.5.3 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.5.2 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.5.1 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.5.0 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.5.0.rc1 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.5.0.pre5 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.5.0.pre4 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.5.0.pre3 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.5.0.pre2 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.5.0.pre1 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.4.3 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.4.3.rc1 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.4.2 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.4.2.rc1 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.4.2.pre1 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.4.1 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.4.1.rc1 spec/kontena/cli/master/user/role/add_command_spec.rb
kontena-cli-1.4.1.pre1 spec/kontena/cli/master/user/role/add_command_spec.rb