Rails5: fix can't quote ActiveSupport::HashWithIndifferentAccess
This commit is contained in:
parent
881ba3f597
commit
83739b8b43
2 changed files with 7 additions and 2 deletions
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
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
|
|||
context 'merge request already exists' do
|
||||
let(:merge_request) { create(:merge_request, target_project: project, source_project: project) }
|
||||
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
|
||||
commits_count = commits.count
|
||||
|
@ -28,7 +28,7 @@ describe Gitlab::Import::MergeRequestCreator do
|
|||
|
||||
context 'new merge request' do
|
||||
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
|
||||
attributes.delete(:id)
|
||||
|
|
Loading…
Reference in a new issue