diff options
author | Łukasz Strzałkowski <lukasz.strzalkowski@gmail.com> | 2014-02-13 18:05:55 +0100 |
---|---|---|
committer | Łukasz Strzałkowski <lukasz.strzalkowski@gmail.com> | 2014-02-13 18:05:55 +0100 |
commit | 00a4af9ab7e2008fe4e1a0cb1f31109a231d7279 (patch) | |
tree | 69e72dc8168a55108b133506c51696cfa1466810 /actionpack/test/dispatch | |
parent | f2dfa83fac5e892335d2bceaa6dfe344515fee26 (diff) | |
download | rails-00a4af9ab7e2008fe4e1a0cb1f31109a231d7279.tar.gz rails-00a4af9ab7e2008fe4e1a0cb1f31109a231d7279.tar.bz2 rails-00a4af9ab7e2008fe4e1a0cb1f31109a231d7279.zip |
Check if variant array contains only symbols
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/request_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb index df47520850..40e32cb4d3 100644 --- a/actionpack/test/dispatch/request_test.rb +++ b/actionpack/test/dispatch/request_test.rb @@ -852,6 +852,14 @@ class RequestTest < ActiveSupport::TestCase request.variant = [:phone, :tablet] assert_equal [:phone, :tablet], request.variant + + assert_raise ArgumentError do + request.variant = [:phone, "tablet"] + end + + assert_raise ArgumentError do + request.variant = "yolo" + end end test "setting variant with non symbol value" do |