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:
parent
1edb151b71
commit
246417c74e
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue