spec/mixpanel/middleware_spec.rb in mixpanel-3.6.2 vs spec/mixpanel/middleware_spec.rb in mixpanel-4.0.0
- old
+ new
@@ -82,11 +82,11 @@
setup_rack_application(DummyApp, {:body => large_script, :headers => {"Content-Type" => "text/html"}})
get "/", {}, {"HTTP_X_REQUESTED_WITH" => "XMLHttpRequest"}
end
it "should not append mixpanel scripts to head element" do
- last_response.body.index('var mp_protocol').should be_nil
+ last_response.body.index('window.mixpanel').should be_nil
end
it "should pass through if the document is not text/html content type" do
last_response.body.should == large_script
end
@@ -156,10 +156,10 @@
setup_rack_application(DummyApp, :body => large_script, :headers => {"Content-Type" => "text/html"})
get "/", {}, {"HTTP_X_REQUESTED_WITH" => "XMLHttpRequest"}
end
it "should not append mixpanel scripts to head element" do
- last_response.body.index('var mp_protocol').should be_nil
+ last_response.body.index('window.mixpanel').should be_nil
end
it "should pass through if the document is not text/html content type" do
last_response.body.should == large_script
end