Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-09 12:10:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-09 12:10:17 +0300
commitad0265eead72a624ce7a020847db4f0f0c877e57 (patch)
tree206e0564b02aa9530e3c95f70eb10a77e074bdf0 /spec/lib/gitlab
parent4dfc8711171fe0c04bc6b8b224687603026dea46 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab')
-rw-r--r--spec/lib/gitlab/import_export/project/tree_restorer_spec.rb31
-rw-r--r--spec/lib/gitlab/project_template_spec.rb3
2 files changed, 33 insertions, 1 deletions
diff --git a/spec/lib/gitlab/import_export/project/tree_restorer_spec.rb b/spec/lib/gitlab/import_export/project/tree_restorer_spec.rb
index c8229eeee94..9fc0fdeb1bc 100644
--- a/spec/lib/gitlab/import_export/project/tree_restorer_spec.rb
+++ b/spec/lib/gitlab/import_export/project/tree_restorer_spec.rb
@@ -956,6 +956,37 @@ describe Gitlab::ImportExport::Project::TreeRestorer do
end
end
end
+
+ context 'with project members' do
+ let(:user) { create(:user, :admin) }
+ let(:user2) { create(:user) }
+ let(:project_members) do
+ [
+ {
+ "id" => 2,
+ "access_level" => 40,
+ "source_type" => "Project",
+ "notification_level" => 3,
+ "user" => {
+ "id" => user2.id,
+ "email" => user2.email,
+ "username" => 'test'
+ }
+ }
+ ]
+ end
+ let(:tree_hash) { { 'project_members' => project_members } }
+
+ before do
+ project.add_maintainer(user)
+ end
+
+ it 'restores project members' do
+ restorer.restore
+
+ expect(project.members.map(&:user)).to contain_exactly(user, user2)
+ end
+ end
end
context 'JSON with invalid records' do
diff --git a/spec/lib/gitlab/project_template_spec.rb b/spec/lib/gitlab/project_template_spec.rb
index 3948e53bc17..ddc41e64147 100644
--- a/spec/lib/gitlab/project_template_spec.rb
+++ b/spec/lib/gitlab/project_template_spec.rb
@@ -25,7 +25,8 @@ describe Gitlab::ProjectTemplate do
described_class.new('nfgitbook', 'Netlify/GitBook', _('A GitBook site that uses Netlify for CI/CD instead of GitLab, but still with all the other great GitLab features.'), 'https://gitlab.com/pages/nfgitbook'),
described_class.new('nfhexo', 'Netlify/Hexo', _('A Hexo site that uses Netlify for CI/CD instead of GitLab, but still with all the other great GitLab features.'), 'https://gitlab.com/pages/nfhexo'),
described_class.new('salesforcedx', 'SalesforceDX', _('A project boilerplate for Salesforce App development with Salesforce Developer tools.'), 'https://gitlab.com/gitlab-org/project-templates/salesforcedx'),
- described_class.new('serverless_framework', 'Serverless Framework/JS', _('A basic page and serverless function that uses AWS Lambda, AWS API Gateway, and GitLab Pages'), 'https://gitlab.com/gitlab-org/project-templates/serverless-framework', 'illustrations/logos/serverless_framework.svg')
+ described_class.new('serverless_framework', 'Serverless Framework/JS', _('A basic page and serverless function that uses AWS Lambda, AWS API Gateway, and GitLab Pages'), 'https://gitlab.com/gitlab-org/project-templates/serverless-framework', 'illustrations/logos/serverless_framework.svg'),
+ described_class.new('cluster_management', 'GitLab Cluster Management', _('An example project for managing Kubernetes clusters integrated with GitLab.'), 'https://gitlab.com/gitlab-org/project-templates/cluster-management')
]
expect(described_class.all).to be_an(Array)