class FreeCookieControllerTest
Public Instance Methods
setup()
click to toggle source
Calls superclass method
# File actionpack/test/controller/request_forgery_protection_test.rb, line 703 def setup @controller = FreeCookieController.new @token = "cf50faa3fe97702ca1ae" super end
test_should_allow_all_methods_without_token()
click to toggle source
# File actionpack/test/controller/request_forgery_protection_test.rb, line 723 def test_should_allow_all_methods_without_token SecureRandom.stub :base64, @token do [:post, :patch, :put, :delete].each do |method| assert_nothing_raised { send(method, :index) } end end end
test_should_not_render_form_with_token_tag()
click to toggle source
# File actionpack/test/controller/request_forgery_protection_test.rb, line 709 def test_should_not_render_form_with_token_tag SecureRandom.stub :base64, @token do get :index assert_select "form>div>input[name=?][value=?]", "authenticity_token", @token, false end end