summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2018-06-20 15:45:15 +0200
committerJames Lopez <james@jameslopez.es>2018-06-20 15:45:15 +0200
commit8522173e0ad912c41aaa68f4e01f03ac73cc4514 (patch)
tree52f90785e2c12eca84cfcd19e7c2e4705cdd224f /spec
parentcc061cd1c664f2003d4c7abb3930834704d2eb9e (diff)
downloadgitlab-ce-8522173e0ad912c41aaa68f4e01f03ac73cc4514.tar.gz
refactor code once again to fix IID issues
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/import_export/group_project_finder_spec.rb28
1 files changed, 14 insertions, 14 deletions
diff --git a/spec/lib/gitlab/import_export/group_project_finder_spec.rb b/spec/lib/gitlab/import_export/group_project_finder_spec.rb
index a86f0c2dd44..c36d80e51d4 100644
--- a/spec/lib/gitlab/import_export/group_project_finder_spec.rb
+++ b/spec/lib/gitlab/import_export/group_project_finder_spec.rb
@@ -16,15 +16,15 @@ describe Gitlab::ImportExport::GroupProjectFinder do
expect(described_class.find_or_new(Label,
title: 'group label',
- 'project_id' => project.id,
- 'group_id' => project.group.id)).to eq(group_label)
+ project: project,
+ group: project.group)).to eq(group_label)
end
it 'initializes a new label' do
label = described_class.find_or_new(Label,
title: 'group label',
- 'project_id' => project.id,
- 'group_id' => project.group.id)
+ project: project,
+ group: project.group)
expect(label.persisted?).to be false
end
@@ -32,8 +32,8 @@ describe Gitlab::ImportExport::GroupProjectFinder do
it 'creates a new label' do
label = described_class.find_or_create(Label,
title: 'group label',
- 'project_id' => project.id,
- 'group_id' => project.group.id)
+ project: project,
+ group: project.group)
expect(label.persisted?).to be true
end
@@ -45,24 +45,24 @@ describe Gitlab::ImportExport::GroupProjectFinder do
expect(described_class.find_or_new(Milestone,
title: 'group milestone',
- 'project_id' => project.id,
- 'group_id' => project.group.id)).to eq(milestone)
+ project: project,
+ group: project.group)).to eq(milestone)
end
it 'initializes a new milestone' do
milestone = described_class.find_or_new(Milestone,
- title: 'group milestone',
- 'project_id' => project.id,
- 'group_id' => project.group.id)
+ title: 'group milestone',
+ project: project,
+ group: project.group)
expect(milestone.persisted?).to be false
end
it 'creates a new milestone' do
milestone = described_class.find_or_create(Milestone,
- title: 'group milestone',
- 'project_id' => project.id,
- 'group_id' => project.group.id)
+ title: 'group milestone',
+ project: project,
+ group: project.group)
expect(milestone.persisted?).to be true
end