diff options
author | Andrew White <pixeltrix@users.noreply.github.com> | 2016-04-04 21:50:26 +0100 |
---|---|---|
committer | Andrew White <pixeltrix@users.noreply.github.com> | 2016-04-04 21:50:26 +0100 |
commit | 0f51dda718696b67b5e98b748e75ea49fc05b360 (patch) | |
tree | b51fa31fb8b8a4df4211fd9af12573760408cacf /actionpack/test/controller/api | |
parent | 426458d50cc0ef5b25d42572c46dac1001fc8007 (diff) | |
parent | f99106805d7275c790466b31514e52544ee1a8d6 (diff) | |
download | rails-0f51dda718696b67b5e98b748e75ea49fc05b360.tar.gz rails-0f51dda718696b67b5e98b748e75ea49fc05b360.tar.bz2 rails-0f51dda718696b67b5e98b748e75ea49fc05b360.zip |
Merge pull request #24304 from rthbound/24239-work
Fixes #24239
Diffstat (limited to 'actionpack/test/controller/api')
-rw-r--r-- | actionpack/test/controller/api/with_cookies_test.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/actionpack/test/controller/api/with_cookies_test.rb b/actionpack/test/controller/api/with_cookies_test.rb new file mode 100644 index 0000000000..4491dc9002 --- /dev/null +++ b/actionpack/test/controller/api/with_cookies_test.rb @@ -0,0 +1,21 @@ +require 'abstract_unit' + +class WithCookiesController < ActionController::API + include ActionController::Cookies + + def with_cookies + render plain: cookies[:foobar] + end +end + +class WithCookiesTest < ActionController::TestCase + tests WithCookiesController + + def test_with_cookies + request.cookies[:foobar] = 'bazbang' + + get :with_cookies + + assert_equal 'bazbang', response.body + end +end |