summaryrefslogtreecommitdiff
path: root/spec/services/projects/fork_service_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-30 12:06:01 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-30 12:06:01 +0000
commitdea6ebd31af8e97e8b14160181bd4ea7578c94e8 (patch)
tree5e429fda4d43aa3450f7d6b015668c3474cd9e6c /spec/services/projects/fork_service_spec.rb
parent94611567bd03083e0ecef7a582a174aa34844482 (diff)
downloadgitlab-ce-dea6ebd31af8e97e8b14160181bd4ea7578c94e8.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/projects/fork_service_spec.rb')
-rw-r--r--spec/services/projects/fork_service_spec.rb21
1 files changed, 12 insertions, 9 deletions
diff --git a/spec/services/projects/fork_service_spec.rb b/spec/services/projects/fork_service_spec.rb
index b759830d603..7e7e80ca240 100644
--- a/spec/services/projects/fork_service_spec.rb
+++ b/spec/services/projects/fork_service_spec.rb
@@ -50,6 +50,7 @@ describe Projects::ForkService do
it { expect(to_project.star_count).to be_zero }
it { expect(to_project.description).to eq(@from_project.description) }
it { expect(to_project.avatar.file).to be_exists }
+ it { expect(to_project.ci_config_path).to eq(@from_project.ci_config_path) }
# This test is here because we had a bug where the from-project lost its
# avatar after being forked.
@@ -215,7 +216,8 @@ describe Projects::ForkService do
@project = create(:project, :repository,
creator_id: @group_owner.id,
star_count: 777,
- description: 'Wow, such a cool project!')
+ description: 'Wow, such a cool project!',
+ ci_config_path: 'debian/salsa-ci.yml')
@group = create(:group)
@group.add_user(@group_owner, GroupMember::OWNER)
@group.add_user(@developer, GroupMember::DEVELOPER)
@@ -228,14 +230,15 @@ describe Projects::ForkService do
it 'group owner successfully forks project into the group' do
to_project = fork_project(@project, @group_owner, @opts)
- expect(to_project).to be_persisted
- expect(to_project.errors).to be_empty
- expect(to_project.owner).to eq(@group)
- expect(to_project.namespace).to eq(@group)
- expect(to_project.name).to eq(@project.name)
- expect(to_project.path).to eq(@project.path)
- expect(to_project.description).to eq(@project.description)
- expect(to_project.star_count).to be_zero
+ expect(to_project).to be_persisted
+ expect(to_project.errors).to be_empty
+ expect(to_project.owner).to eq(@group)
+ expect(to_project.namespace).to eq(@group)
+ expect(to_project.name).to eq(@project.name)
+ expect(to_project.path).to eq(@project.path)
+ expect(to_project.description).to eq(@project.description)
+ expect(to_project.ci_config_path).to eq(@project.ci_config_path)
+ expect(to_project.star_count).to be_zero
end
end