1. 05 6月, 2011 3 次提交
    • A
      Add backward compatibility for testing cookies · e864ff72
      Andrew White 提交于
      This commit restores the ability to assign cookies for testing via
      @request.env['HTTP_COOKIE'] and @request.cookies, e.g:
      
          @request.env['HTTP_COOKIE'] = 'user_name=david'
          get :index
          assert_equal 'david', cookies[:user_name]
      
      and
      
          @request.cookies[:user_name] = 'david'
          get :index
          assert_equal 'david', cookies[:user_name]
      
      Assigning via cookies[] is the preferred method and will take precedence
      over the other two methods. This is so that cookies set in controller
      actions have precedence and are carried over between calls to get, post, etc.
      e864ff72
    • A
      Ensure cookie keys are strings · 0a927041
      Andrew White 提交于
      0a927041
    • G
      Allow multiple sources in Sprockets helpers · db8eeaff
      Guillermo Iguaran 提交于
      db8eeaff
  2. 04 6月, 2011 2 次提交
    • A
      Add missing require for cookies middleware · a50865c7
      Andrew White 提交于
      a50865c7
    • A
      Refactor ActionController::TestCase cookies · d4658d86
      Andrew White 提交于
      Assigning cookies for test cases should now use cookies[], e.g:
      
        cookies[:email] = 'user@example.com'
        get :index
        assert_equal 'user@example.com', cookies[:email]
      
      To clear the cookies, use clear, e.g:
      
        cookies.clear
        get :index
        assert_nil cookies[:email]
      
      We now no longer write out HTTP_COOKIE and the cookie jar is
      persistent between requests so if you need to manipulate the environment
      for your test you need to do it before the cookie jar is created.
      d4658d86
  3. 01 6月, 2011 3 次提交
  4. 31 5月, 2011 1 次提交
  5. 30 5月, 2011 1 次提交
  6. 28 5月, 2011 2 次提交
  7. 26 5月, 2011 2 次提交
  8. 25 5月, 2011 5 次提交
  9. 24 5月, 2011 11 次提交
  10. 23 5月, 2011 10 次提交