Sha256: 7070c7c111e3a7cb96592e7c4e2ceb3fd7e477f2ddacaa233243c627a526c09f

Contents?: true

Size: 782 Bytes

Versions: 1

Compression:

Stored size: 782 Bytes

Contents

require 'support/capybara_app_helper'

RSpec.describe "Zanox Integration" do

  before do
    setup_app(action: :zanox) do |tracker|
      tracker.handler(:zanox, { account_id: '12345H123456789' } )
    end

    visit '/'
  end

  subject { page }

  it 'should include the mastertag event' do
    expect(page.find("body")).to have_content "window._zx.push({\"id\": \"blurg567\"});"
  end

  it 'should include the sale event' do
    expect(page).to have_xpath "//script[contains(@src,'pps/?12345H123456789&mode=[[1]]&CustomerID=[[123456]]&OrderID=[[DEFC-4321]]&CurrencySymbol=[[EUR]]&TotalPrice=[[150.00]]')]"
  end

  it 'should include the lead event' do
    expect(page).to have_xpath "//script[contains(@src,'ppl/?12345H123456789&mode=[[1]]&CustomerID=[[654321]]')]"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rack-tracker-1.0.0 spec/integration/zanox_integration_spec.rb