Commit 83739b8b authored by Jasper Maes's avatar Jasper Maes

Rails5: fix can't quote ActiveSupport::HashWithIndifferentAccess

parent 881ba3f5
---
title: 'Rails5: fix can''t quote ActiveSupport::HashWithIndifferentAccess'
merge_request: 21397
author: Jasper Maes
type: other
...@@ -11,7 +11,7 @@ describe Gitlab::Import::MergeRequestCreator do ...@@ -11,7 +11,7 @@ describe Gitlab::Import::MergeRequestCreator do
context 'merge request already exists' do context 'merge request already exists' do
let(:merge_request) { create(:merge_request, target_project: project, source_project: project) } let(:merge_request) { create(:merge_request, target_project: project, source_project: project) }
let(:commits) { merge_request.merge_request_diffs.first.commits } let(:commits) { merge_request.merge_request_diffs.first.commits }
let(:attributes) { HashWithIndifferentAccess.new(merge_request.attributes) } let(:attributes) { HashWithIndifferentAccess.new(merge_request.attributes.except("merge_params")) }
it 'updates the data' do it 'updates the data' do
commits_count = commits.count commits_count = commits.count
...@@ -28,7 +28,7 @@ describe Gitlab::Import::MergeRequestCreator do ...@@ -28,7 +28,7 @@ describe Gitlab::Import::MergeRequestCreator do
context 'new merge request' do context 'new merge request' do
let(:merge_request) { build(:merge_request, target_project: project, source_project: project) } let(:merge_request) { build(:merge_request, target_project: project, source_project: project) }
let(:attributes) { HashWithIndifferentAccess.new(merge_request.attributes) } let(:attributes) { HashWithIndifferentAccess.new(merge_request.attributes.except("merge_params")) }
it 'creates a new merge request' do it 'creates a new merge request' do
attributes.delete(:id) attributes.delete(:id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment