Sha256: 6c27eab7c89b9ed2a9627f7054533a045a2eea416a3708e78516b2ce678a1e9a

Contents?: true

Size: 572 Bytes

Versions: 3

Compression:

Stored size: 572 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe BrazeRuby::REST::IdentifyUsers do
  let(:http) { double(:http) }

  let(:payload) { {aliases_to_identify: [user]} }
  let(:user) { { external_id: 123, user_alias: { alias_name: 'abc', alias_label: 'foo' } } }

  let(:api_key) { :api_key }

  subject { described_class.new :api_key, :rest_url, {}}

  before { subject.http = http }

  it 'makes an http call to the identify users endpoint' do
    expect(http).to receive(:post).with '/users/identify',
        payload

    subject.perform(**payload)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
braze_ruby-0.4.2 spec/braze_ruby/rest/identify_users_spec.rb
braze_ruby-0.4.1 spec/braze_ruby/rest/identify_users_spec.rb
braze_ruby-0.4.0 spec/braze_ruby/rest/identify_users_spec.rb