Sha256: 08790d9c462e8dcba95af41c57187110dc03c08e94dbb1974e4ff75310f670aa

Contents?: true

Size: 619 Bytes

Versions: 2

Compression:

Stored size: 619 Bytes

Contents

require 'kontena/cli/master/users_command'
require 'kontena/cli/master/users/invite_command'

describe Kontena::Cli::Master::Users::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

2 entries across 2 versions & 1 rubygems

Version Path
kontena-cli-1.2.0.pre1 spec/kontena/cli/master/users/invite_command_spec.rb
kontena-cli-1.2.0.dev1 spec/kontena/cli/master/users/invite_command_spec.rb