test/unit/controllers/evercookie_controller_test.rb in evercookie-0.1.0 vs test/unit/controllers/evercookie_controller_test.rb in evercookie-0.1.1
- old
+ new
@@ -1,36 +1,36 @@
require 'test_helper'
class EvercookieControllerTest < ActionController::TestCase
test "should have route to set evercookie" do
- assert_routing '/evercookie/set',
+ assert_routing '/ecc/set',
{ controller: "evercookie/evercookie", action: "set" }
end
test "should have route to get evercookie" do
- assert_routing '/evercookie/get',
+ assert_routing '/ecc/get',
{ controller: "evercookie/evercookie", action: "get" }
end
test "should have route to save evercookie" do
- assert_routing '/evercookie/save',
+ assert_routing '/ecc/save',
{ controller: "evercookie/evercookie", action: "save" }
end
test "should have route to ec_png evercookie" do
- assert_routing '/evercookie/ec_png',
+ assert_routing '/ecc/ec_png',
{ controller: "evercookie/evercookie", action: "ec_png" }
end
test "should have route to ec_cache evercookie" do
- assert_routing '/evercookie/ec_cache',
+ assert_routing '/ecc/ec_cache',
{ controller: "evercookie/evercookie", action: "ec_cache" }
end
test "should have route to ec_etag evercookie" do
- assert_routing '/evercookie/ec_etag',
+ assert_routing '/ecc/ec_etag',
{ controller: "evercookie/evercookie", action: "ec_etag" }
end
test "should set view variables on evercookie set and have right js" do
@controller = Evercookie::EvercookieController.new
@@ -42,11 +42,11 @@
assert_response :success
assert_equal session_data, assigns(:data).symbolize_keys
- assert @response.body.include? "var ec = new evercookie()"
+ assert @response.body.include? "var ec = new ecc()"
assert @response.body.include? "ec.set('testkey', 'testvalue')"
end
test "should set view variables on evercookie get and have right js" do
@controller = Evercookie::EvercookieController.new
@@ -56,10 +56,10 @@
get :get, format: :js
assert_response :success
assert_equal session_data, assigns(:data).symbolize_keys
- assert @response.body.include? "var ec = new evercookie()"
+ assert @response.body.include? "var ec = new ecc()"
assert @response.body.include? "ec.get('testkey')"
end
test "should set session variables on evercookie save if cookie present" do
@controller = Evercookie::EvercookieController.new