Unverified Commit 3515cb9b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files
parent 2104f28191ae
......@@ -56,25 +56,4 @@
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
......@@ -43,14 +43,10 @@
end
context 'GitLab CI is enabled' do
it "calls fork registrator for CI" do
create(:ci_project, gl_project: @from_project)
@from_project.build_missing_services
@from_project.gitlab_ci_service.update_attributes(active: true)
expect_any_instance_of(Project).to receive(:enable_ci)
fork_project(@from_project, @to_user)
it "fork and enable CI for fork" do
@from_project.enable_ci
@to_project = fork_project(@from_project, @to_user)
expect(@to_project.gitlab_ci?).to be_truthy
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