From ccbba229386bdc629be5f5f4ef765ab5e29e7da7 Mon Sep 17 00:00:00 2001 From: Mohsen Alizadeh Date: Sun, 3 Dec 2017 15:16:52 +0330 Subject: add test case to relation select --- activerecord/test/cases/relation/select_test.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 activerecord/test/cases/relation/select_test.rb (limited to 'activerecord/test/cases') 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 -- cgit v1.2.3