Sha256: 17a549e426ed3ef97271d0b5e6ea1f0dd330300d4cca879368810ac6a912a739

Contents?: true

Size: 654 Bytes

Versions: 3

Compression:

Stored size: 654 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

RSpec.describe 'canvas' do
  describe 'trigger_send' do
    it 'sends a canvas', vcr: true do
      response = api.trigger_canvas_send(
        canvas_id: '70a7fb99-cbcb-451a-8224-5f8b8c63e03f',
        recipients: [
          external_user_id: 12345,
          canvas_entry_properties: {first_name: 'John'}
        ]
      )

      expect(response.success?).to eq(true)
    end
  end

  describe 'details' do
    it 'returns error when no canvas', vcr: true do
      response = api.canvas_details(
        canvas_id: 'non-existing'
      )
      expect(response.status).to eq(400)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
braze_ruby-0.4.2 spec/integrations/canvas_spec.rb
braze_ruby-0.4.1 spec/integrations/canvas_spec.rb
braze_ruby-0.4.0 spec/integrations/canvas_spec.rb