Commit 3515cb9b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
parent 37e9e71e
...@@ -56,25 +56,4 @@ describe GitlabCiService do ...@@ -56,25 +56,4 @@ describe GitlabCiService do
end end
end end
end end
describe "Fork registration" do
before do
@old_project = create(:ci_project).gl_project
@project = create(:empty_project)
@user = create(:user)
@service = GitlabCiService.new
allow(@service).to receive_messages(
service_hook: true,
project_url: 'http://ci.gitlab.org/projects/2',
token: 'verySecret',
project: @old_project
)
end
it "creates fork on CI" do
expect_any_instance_of(Ci::CreateProjectService).to receive(:execute)
@service.fork_registration(@project, @user)
end
end
end end
...@@ -43,14 +43,10 @@ describe Projects::ForkService do ...@@ -43,14 +43,10 @@ describe Projects::ForkService do
end end
context 'GitLab CI is enabled' do context 'GitLab CI is enabled' do
it "calls fork registrator for CI" do it "fork and enable CI for fork" do
create(:ci_project, gl_project: @from_project) @from_project.enable_ci
@from_project.build_missing_services @to_project = fork_project(@from_project, @to_user)
@from_project.gitlab_ci_service.update_attributes(active: true) expect(@to_project.gitlab_ci?).to be_truthy
expect_any_instance_of(Project).to receive(:enable_ci)
fork_project(@from_project, @to_user)
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment