Skip to content

Commit

Permalink
Merge pull request #2263 from tvdeyen/fix-mysql-builds
Browse files Browse the repository at this point in the history
CI: Fix mysql builds
  • Loading branch information
tvdeyen authored Mar 17, 2022
2 parents 63eec69 + 9c46da2 commit 1b625fd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 7 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ source "https://rubygems.org"
gemspec

rails_version = ENV.fetch("RAILS_VERSION", 6.1).to_f
gem "rails", "~> #{rails_version}.0"
# Necessary until a new 6.1.5 version has been released
# https://github.com/rails/rails/pull/44691
if rails_version.to_s.match?(/6.1/)
gem "rails", git: "https://github.com/rails/rails", branch: "6-1-stable"
else
gem "rails", "~> #{rails_version}.0"
end

if ENV["DB"].nil? || ENV["DB"] == "sqlite"
gem "sqlite3", "~> 1.4.1"
Expand Down
7 changes: 5 additions & 2 deletions spec/controllers/alchemy/api/pages_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ module Alchemy
context "as guest user" do
it "only returns pages for current site" do
get :index, format: :json
expect(result["pages"].map { |r| r["id"] }).to eq([page.parent_id, page.id])
expect(result["pages"].map { |r| r["id"] }).to match_array([
page.parent_id,
page.id,
])
end
end

Expand All @@ -100,7 +103,7 @@ module Alchemy

it "returns all pages" do
get :index, format: :json
expect(result["pages"].map { |r| r["id"] }).to eq([
expect(result["pages"].map { |r| r["id"] }).to match_array([
page.parent_id,
page.id,
site_2_page.parent_id,
Expand Down

0 comments on commit 1b625fd

Please sign in to comment.