Sha256: 0fe3d95ee361dcab9d001d122eb663a05594ac5e2b296407565d53994155421d

Contents?: true

Size: 616 Bytes

Versions: 11

Compression:

Stored size: 616 Bytes

Contents

require 'kontena/cli/master/user_command'
require 'kontena/cli/master/user/invite_command'

describe Kontena::Cli::Master::User::InviteCommand do

  include ClientHelpers

  describe "#invite" do
    it 'makes invitation request for all given users' do
      expect(client).to receive(:post).with("/oauth2/authorize", {email: 'john@example.org', external_id: nil, response_type: "invite"}).once
      expect(client).to receive(:post).with("/oauth2/authorize", {email: 'jane@example.org', external_id: nil, response_type: "invite"}).once

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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
kontena-cli-1.2.2 spec/kontena/cli/master/user/invite_command_spec.rb
kontena-cli-1.2.2.rc2 spec/kontena/cli/master/user/invite_command_spec.rb
kontena-cli-1.2.2.rc1 spec/kontena/cli/master/user/invite_command_spec.rb
kontena-cli-1.2.1 spec/kontena/cli/master/user/invite_command_spec.rb
kontena-cli-1.2.1.rc1 spec/kontena/cli/master/user/invite_command_spec.rb
kontena-cli-1.2.0 spec/kontena/cli/master/user/invite_command_spec.rb
kontena-cli-1.2.0.rc3 spec/kontena/cli/master/user/invite_command_spec.rb
kontena-cli-1.2.0.rc2 spec/kontena/cli/master/user/invite_command_spec.rb
kontena-cli-1.2.0.rc1 spec/kontena/cli/master/user/invite_command_spec.rb
kontena-cli-1.2.0.pre3 spec/kontena/cli/master/user/invite_command_spec.rb
kontena-cli-1.2.0.pre2 spec/kontena/cli/master/user/invite_command_spec.rb