Sha256: 6e1ea86013eef37b8ddd3704bba67a58dbb174807f823d1fa0a77ff4c1658caa
Contents?: true
Size: 847 Bytes
Versions: 7
Compression:
Stored size: 847 Bytes
Contents
require 'support/capybara_app_helper' RSpec.describe "Google Global Integration Integration" do before do setup_app(action: :google_global) do |tracker| tracker.handler :google_global, trackers: [{ id: 'U-XXX-Y' }] end visit '/' end subject { page } it "embeds the script tag with tracking event from the controller action" do expect(page.find("head")).to have_content('U-XXX-Y') end describe 'adjust tracker position via options' do before do setup_app(action: :google_global) do |tracker| tracker.handler :google_global, trackers: [{ id: 'U-XXX-Y' }], position: :body end visit '/' end it "will be placed in the specified tag" do expect(page.find("head")).to_not have_content('U-XXX-Y') expect(page.find("body")).to have_content('U-XXX-Y') end end end
Version data entries
7 entries across 7 versions & 1 rubygems