diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-03 15:08:45 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-03 15:08:45 +0000 |
commit | 55693cc1ec8ac79444bc7214d2812a4ac41bf043 (patch) | |
tree | c9e9df7be9eac5dd1ea71f65da9a6831834b08c4 /spec | |
parent | c089cf73c2f1835dc68fd6107d6cbd10fc17f365 (diff) | |
download | gitlab-ce-55693cc1ec8ac79444bc7214d2812a4ac41bf043.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r-- | spec/controllers/help_controller_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/import_export/group_project_object_builder_spec.rb | 24 |
2 files changed, 23 insertions, 3 deletions
diff --git a/spec/controllers/help_controller_spec.rb b/spec/controllers/help_controller_spec.rb index 3fce296ef90..e010cac2f73 100644 --- a/spec/controllers/help_controller_spec.rb +++ b/spec/controllers/help_controller_spec.rb @@ -111,7 +111,7 @@ describe HelpController do it 'renders the raw file' do get :show, params: { - path: 'fixtures/gitlab_tanuki' + path: 'user/img/markdown_logo' }, format: :png expect(response).to be_successful diff --git a/spec/lib/gitlab/import_export/group_project_object_builder_spec.rb b/spec/lib/gitlab/import_export/group_project_object_builder_spec.rb index 355757654da..34049cbf570 100644 --- a/spec/lib/gitlab/import_export/group_project_object_builder_spec.rb +++ b/spec/lib/gitlab/import_export/group_project_object_builder_spec.rb @@ -3,13 +3,15 @@ require 'spec_helper' describe Gitlab::ImportExport::GroupProjectObjectBuilder do - let(:project) do + let!(:group) { create(:group, :private) } + let!(:subgroup) { create(:group, :private, parent: group) } + let!(:project) do create(:project, :repository, :builds_disabled, :issues_disabled, name: 'project', path: 'project', - group: create(:group)) + group: subgroup) end let(:lru_cache) { subject.send(:lru_cache) } @@ -75,6 +77,15 @@ describe Gitlab::ImportExport::GroupProjectObjectBuilder do 'group' => project.group)).to eq(group_label) end + it 'finds the existing group label in root ancestor' do + group_label = create(:group_label, name: 'group label', group: group) + + expect(described_class.build(Label, + 'title' => 'group label', + 'project' => project, + 'group' => group)).to eq(group_label) + end + it 'creates a new label' do label = described_class.build(Label, 'title' => 'group label', @@ -95,6 +106,15 @@ describe Gitlab::ImportExport::GroupProjectObjectBuilder do 'group' => project.group)).to eq(milestone) end + it 'finds the existing group milestone in root ancestor' do + milestone = create(:milestone, name: 'group milestone', group: group) + + expect(described_class.build(Milestone, + 'title' => 'group milestone', + 'project' => project, + 'group' => group)).to eq(milestone) + end + it 'creates a new milestone' do milestone = described_class.build(Milestone, 'title' => 'group milestone', |