From 2d1faddbcb3b814a381f91cf48cc597d47b29ee0 Mon Sep 17 00:00:00 2001 From: Jasper Maes Date: Wed, 6 Jun 2018 08:46:42 +0200 Subject: [PATCH] Rails 5 fix glob spec --- changelogs/unreleased/rails5-fix-47376.yml | 5 +++++ spec/lib/gitlab/sql/glob_spec.rb | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changelogs/unreleased/rails5-fix-47376.yml diff --git a/changelogs/unreleased/rails5-fix-47376.yml b/changelogs/unreleased/rails5-fix-47376.yml new file mode 100644 index 00000000000..ac9950e908e --- /dev/null +++ b/changelogs/unreleased/rails5-fix-47376.yml @@ -0,0 +1,5 @@ +--- +title: Rails 5 fix glob spec +merge_request: 19469 +author: Jasper Maes +type: fixed diff --git a/spec/lib/gitlab/sql/glob_spec.rb b/spec/lib/gitlab/sql/glob_spec.rb index f0bb4294d62..1cf8935bfe3 100644 --- a/spec/lib/gitlab/sql/glob_spec.rb +++ b/spec/lib/gitlab/sql/glob_spec.rb @@ -35,8 +35,9 @@ describe Gitlab::SQL::Glob do value = query("SELECT #{quote(string)} LIKE #{pattern}") .rows.flatten.first + check = Gitlab.rails5? ? true : 't' case value - when 't', 1 + when check, 1 true else false