diff --git a/bug_report_templates/test-ransack-scope-and-column-same-name.rb b/bug_report_templates/test-ransack-scope-and-column-same-name.rb index 47f9166..197cf24 100644 --- a/bug_report_templates/test-ransack-scope-and-column-same-name.rb +++ b/bug_report_templates/test-ransack-scope-and-column-same-name.rb @@ -12,14 +12,13 @@ unless File.exist?('Gemfile') source 'https://rubygems.org' # Rails master - gem 'rails', github: 'rails/rails' + gem 'rails', github: 'rails/rails', branch: '6-1-stable' # Rails last release # gem 'rails' gem 'sqlite3' gem 'ransack', github: 'activerecord-hackery/ransack' - gem 'polyamorous', github: 'activerecord-hackery/polyamorous' GEMFILE system 'bundle install' @@ -65,7 +64,7 @@ class BugTest < Minitest::Test sql = User.ransack({ activated: true }).result.to_sql puts sql assert_equal( - "SELECT \"users\".* FROM \"users\" WHERE \"users\".\"active\" = 't'", sql + "SELECT \"users\".* FROM \"users\" WHERE \"users\".\"active\" = 1", sql ) end diff --git a/bug_report_templates/test-ransacker-arel-present-predicate.rb b/bug_report_templates/test-ransacker-arel-present-predicate.rb index db49468..6939c20 100644 --- a/bug_report_templates/test-ransacker-arel-present-predicate.rb +++ b/bug_report_templates/test-ransacker-arel-present-predicate.rb @@ -10,14 +10,13 @@ unless File.exist?('Gemfile') source 'https://rubygems.org' # Rails master - gem 'rails', github: 'rails/rails' + gem 'rails', github: 'rails/rails', branch: '6-1-stable' # Rails last release # gem 'rails' gem 'sqlite3' gem 'ransack', github: 'activerecord-hackery/ransack' - gem 'polyamorous', github: 'activerecord-hackery/polyamorous' GEMFILE system 'bundle install' @@ -61,11 +60,11 @@ end class BugTest < Minitest::Test def test_ransackers - sql = Project.ransack({number_present: 1}).result.to_sql + sql = Project.ransack({ number_present: 1 }).result.to_sql puts sql assert_equal "SELECT \"projects\".* FROM \"projects\" WHERE (\"projects\".\"number\" IS NOT NULL AND \"projects\".\"number\" != '')", sql - sql = Project.ransack({name_present: 1}).result.to_sql + sql = Project.ransack({ name_present: 1 }).result.to_sql puts sql assert_equal "SELECT \"projects\".* FROM \"projects\" WHERE (projects.name IS NOT NULL AND projects.name != '')", sql end