Sha256: 4d3953ed1b5c1e5f234192d457f33ca72db2c8fd84d5c2510894e6e06372ab8b
Contents?: true
Size: 656 Bytes
Versions: 5
Compression:
Stored size: 656 Bytes
Contents
require 'support/capybara_app_helper' RSpec.describe "Facebook Integration" do before do setup_app(action: :google_analytics) do |tracker| tracker.handler :google_analytics, { tracker: 'U-XXX-Y' } end visit '/' end subject { page } it "embeds the script tag with tracking event from the controller action" do expect(page).to have_content('ga("ecommerce:addItem",{"id":"1234","affiliation":"Acme Clothing","revenue":"11.99","shipping":"5","tax":"1.29"})') expect(page).to have_content('ga("send",{"hitType":"event","eventCategory":"button","eventAction":"click","eventLabel":"nav-buttons","eventValue":"X"})') end end
Version data entries
5 entries across 5 versions & 1 rubygems