Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Fix mysql builds #2263

Merged
merged 2 commits into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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