Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix syntax error and remove duplicated test

  • Loading branch information...
commit 507d23c421b189ac8386e0605c57ab3db831001e 1 parent c7a4fef
@carlosantoniodasilva carlosantoniodasilva authored
Showing with 4 additions and 6 deletions.
  1. +4 −6 activerecord/test/cases/relation/where_test.rb
View
10 activerecord/test/cases/relation/where_test.rb
@@ -82,6 +82,10 @@ def test_where_with_table_name_and_empty_hash
assert_equal 0, Post.where(:posts => {}).count
end
+ def test_where_with_table_name_and_empty_array
+ assert_equal 0, Post.where(:id => []).count
+ end
+
def test_where_with_empty_hash_and_no_foreign_key
assert_equal 0, Edge.where(:sink => {}).count
end
@@ -90,12 +94,6 @@ def test_where_with_blank_conditions
[[], {}, nil, ""].each do |blank|
assert_equal 4, Edge.where(blank).order("sink_id").to_a.size
end
- def test_where_with_table_name_and_empty_array
- assert_equal 0, Post.where(:id => []).count
- end
-
- def test_where_with_empty_hash_and_no_foreign_key
- assert_equal 0, Edge.where(:sink => {}).count
end
end
end

2 comments on commit 507d23c

@goshakkk

They appear to test different cases — one with an array and one with a hash. Do you think it's duplicate?

@carlosantoniodasilva

@goshakkk the removed test was test_where_with_empty_hash_and_no_foreign_key, the other one, test_where_with_table_name_and_empty_array, was just moved closer to the related ones.

Please sign in to comment.
Something went wrong with that request. Please try again.