diff options
author | Mohsen Alizadeh <mohsen@alizadeh.us> | 2017-12-03 15:16:52 +0330 |
---|---|---|
committer | Mohsen Alizadeh <mohsen@alizadeh.us> | 2017-12-03 15:16:52 +0330 |
commit | ccbba229386bdc629be5f5f4ef765ab5e29e7da7 (patch) | |
tree | a8eb2c2dc03e8f89d4167da55093e9d65164af50 | |
parent | 2dafbeed5e2afc001aa64ebf6363f350a6f259ac (diff) | |
download | rails-ccbba229386bdc629be5f5f4ef765ab5e29e7da7.tar.gz rails-ccbba229386bdc629be5f5f4ef765ab5e29e7da7.tar.bz2 rails-ccbba229386bdc629be5f5f4ef765ab5e29e7da7.zip |
add test case to relation select
-rw-r--r-- | activerecord/test/cases/relation/select_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/activerecord/test/cases/relation/select_test.rb b/activerecord/test/cases/relation/select_test.rb new file mode 100644 index 0000000000..0577e6bfdb --- /dev/null +++ b/activerecord/test/cases/relation/select_test.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +require "cases/helper" +require "models/post" + +module ActiveRecord + class SelectTest < ActiveRecord::TestCase + fixtures :posts + + def test_select_with_nil_agrument + expected = Post.select(:title).to_sql + assert_equal expected, Post.select(nil).select(:title).to_sql + end + end +end |