提交 3ba9d32c 编写于 作者: S Sean Griffin

Add a test case for range type casting

We support this behavior, but have no tests which assert that type
casting actually occurs.
上级 4b534152
......@@ -522,6 +522,10 @@ def test_find_by_slug_with_array
assert_equal Topic.find(['1-meowmeow', '2-hello']), Topic.find([1, 2])
end
def test_find_by_slug_with_range
assert_equal Topic.where(id: '1-meowmeow'..'2-hello'), Topic.where(id: 1..2)
end
def test_equality_of_new_records
assert_not_equal Topic.new, Topic.new
assert_equal false, Topic.new == Topic.new
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册