require 'rails_helper'

# Basic middleware integration test to ensure Rack::JSONP continues to do its job
feature "JSONP API results" do
  scenario "User requests events.json with a JSONP callback specified" do
    visit "/events.json?callback=myFunction"
    expect(page).to have_content /^myFunction\(/
  end
end

require 'rails_helper'

# Basic middleware integration test to ensure Rack::JSONP continues to do its job
feature "JSONP API results" do
  scenario "User requests events.json with a JSONP callback specified" do
    visit "/events.json?callback=myFunction"
    expect(page).to have_content /^(?:\/\*\*\/)?myFunction\(/
  end
end

Fix JSONP integration test for newer rack-contrib versions
Fix JSONP integration test for newer rack-contrib versions

The JSONP padding changed from functionName() to /**/functionName()
in rack-contrib 1.2

#441