diff options
author | James Lopez <james@jameslopez.es> | 2018-06-20 15:45:15 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2018-06-20 15:45:15 +0200 |
commit | 8522173e0ad912c41aaa68f4e01f03ac73cc4514 (patch) | |
tree | 52f90785e2c12eca84cfcd19e7c2e4705cdd224f /spec | |
parent | cc061cd1c664f2003d4c7abb3930834704d2eb9e (diff) | |
download | gitlab-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.rb | 28 |
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 |