Sha256: 7039a8f61d3b4da01991fd8fc523dccfe516fe79fab63145c8f85b91614e740e
Contents?: true
Size: 775 Bytes
Versions: 31
Compression:
Stored size: 775 Bytes
Contents
require 'support/capybara_app_helper' RSpec.describe "Facebook Integration" do before do setup_app(action: :facebook) do |tracker| tracker.handler :facebook, { custom_audience: 'my-audience' } end visit '/' end subject { page } it "embeds the script tag with tracking event from the controller action" do expect(page).to have_content('window._fbq.push(["addPixelId", "my-audience"]);') expect(page.body).to include('https://www.facebook.com/tr?id=my-audience&ev=PixelInitialized') expect(page).to have_content('window._fbq.push(["track","conversion-event",{"value":"1","currency":"EUR"}]);') expect(page.body).to include('https://www.facebook.com/offsite_event.php?id=conversion-event&value=1&currency=EUR') end end
Version data entries
31 entries across 31 versions & 1 rubygems