Sha256: 5f0863c6d3844c47d085f321e7001998dc72fa8641249b5d2eed3ffc5d9dd170

Contents?: true

Size: 695 Bytes

Versions: 28

Compression:

Stored size: 695 Bytes

Contents

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

describe Kontena::Cli::Master::Users::InviteCommand do

  include ClientHelpers

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

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

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

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
kontena-cli-1.0.0.pre2 spec/kontena/cli/master/users/invite_command_spec.rb
kontena-cli-1.0.0.pre1 spec/kontena/cli/master/users/invite_command_spec.rb
kontena-cli-0.17.0.pre5 spec/kontena/cli/master/users/invite_command_spec.rb
kontena-cli-0.17.0.pre4 spec/kontena/cli/master/users/invite_command_spec.rb
kontena-cli-0.17.0.pre3 spec/kontena/cli/master/users/invite_command_spec.rb
kontena-cli-0.17.0.pre2 spec/kontena/cli/master/users/invite_command_spec.rb
kontena-cli-0.17.0.pre1 spec/kontena/cli/master/users/invite_command_spec.rb
kontena-cli-0.16.3 spec/kontena/cli/master/users/invite_command_spec.rb
kontena-cli-0.16.3.rc1 spec/kontena/cli/master/users/invite_command_spec.rb
kontena-cli-0.16.2 spec/kontena/cli/master/users/invite_command_spec.rb
kontena-cli-0.16.2.rc1 spec/kontena/cli/master/users/invite_command_spec.rb
kontena-cli-0.16.1 spec/kontena/cli/master/users/invite_command_spec.rb
kontena-cli-0.16.1.rc3 spec/kontena/cli/master/users/invite_command_spec.rb
kontena-cli-0.16.1.rc2 spec/kontena/cli/master/users/invite_command_spec.rb
kontena-cli-0.16.1.rc1 spec/kontena/cli/master/users/invite_command_spec.rb
kontena-cli-0.16.0 spec/kontena/cli/master/users/invite_command_spec.rb
kontena-cli-0.16.0.rc3 spec/kontena/cli/master/users/invite_command_spec.rb
kontena-cli-0.16.0.rc2 spec/kontena/cli/master/users/invite_command_spec.rb
kontena-cli-0.16.0.rc1 spec/kontena/cli/master/users/invite_command_spec.rb
kontena-cli-0.16.0.pre9 spec/kontena/cli/master/users/invite_command_spec.rb