Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add test

  • Loading branch information...
commit 2ca4604de731d9fa1dbabcbadf0ef6636c7e74b8 1 parent f3dd234
@tfwright authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 test/has_scope_test.rb
View
9 test/has_scope_test.rb
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.