Sha256: e66211c4b6d155771797f70f18e9386f61544cb8f5c0c44f064a485585b896f3

Contents?: true

Size: 795 Bytes

Versions: 7

Compression:

Stored size: 795 Bytes

Contents

require 'test_helper'
require 'action_view/test_case'

class EvercookieViewHelperTest < ActionView::TestCase

  include Evercookie::ViewHelper

  test 'that view have helpers' do
    assert self.methods.include?(:set_evercookie)
    assert self.methods.include?(:check_evercookie)
  end

  test 'that set_evercookie helper returns result' do
    result = set_evercookie(:testkey, :testvalue)
    assert_not_nil result
    assert_select 'script', 2
    assert result.include? "assets/ec.js"
    assert result.include? "evercookie/set.js"
  end

  test 'that check_evercookie helper returns result' do
    result = check_evercookie(:testkey)
    assert_not_nil result
    assert_select 'script', 2
    assert result.include? "assets/ec.js"
    assert result.include? "evercookie/get.js"
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
evercookie-0.1.0 test/unit/helpers/evercookie_view_helper_test.rb
evercookie-0.0.6 test/unit/helpers/evercookie_view_helper_test.rb
evercookie-0.0.5 test/unit/helpers/evercookie_view_helper_test.rb
evercookie-0.0.4 test/unit/helpers/evercookie_view_helper_test.rb
evercookie-0.0.3 test/unit/helpers/evercookie_view_helper_test.rb
evercookie-0.0.2 test/unit/helpers/evercookie_view_helper_test.rb
evercookie-0.0.1 test/unit/helpers/evercookie_view_helper_test.rb