1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add a test for select argument error with block

This added test is for select with arguments and block.
This commit is contained in:
Takayuki Nakata 2019-09-04 10:25:05 +09:00
parent 1edb151b71
commit 246417c74e

View file

@ -952,6 +952,10 @@ class RelationTest < ActiveRecord::TestCase
assert_raises(ArgumentError) { Developer.select }
end
def test_select_argument_error_with_block
assert_raises(ArgumentError) { Developer.select(:id) { |d| d.id % 2 == 0 } }
end
def test_count
posts = Post.all