Permalink
Browse files

Add test

  • Loading branch information...
1 parent f3dd234 commit 2ca4604de731d9fa1dbabcbadf0ef6636c7e74b8 @tfwright committed Feb 11, 2013
Showing with 9 additions and 0 deletions.
  1. +9 −0 test/has_scope_test.rb
View
@@ -179,6 +179,15 @@ def test_nested_hash_with_blank_values_is_ignored
assert_equal({ }, current_scopes)
end
+ def test_nested_blank_array_param_is_ignored
+ hash = { "parent" => [""] }
+ Tree.expects(:paginate).never
+ Tree.expects(:all).returns([mock_tree])
+ get :index, :paginate => hash
+ assert_equal([mock_tree], assigns(:trees))
+ assert_equal({ }, current_scopes)
+ end
+
def test_scope_of_type_array
array = %w(book kitchen sport)
Tree.expects(:categories).with(array).returns(Tree)

0 comments on commit 2ca4604

Please sign in to comment.