Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
3515cb9b
Commit
3515cb9b
authored
Oct 02, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
37e9e71e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
29 deletions
+4
-29
spec/models/project_services/gitlab_ci_service_spec.rb
spec/models/project_services/gitlab_ci_service_spec.rb
+0
-21
spec/services/projects/fork_service_spec.rb
spec/services/projects/fork_service_spec.rb
+4
-8
No files found.
spec/models/project_services/gitlab_ci_service_spec.rb
View file @
3515cb9b
...
...
@@ -56,25 +56,4 @@ describe GitlabCiService do
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
spec/services/projects/fork_service_spec.rb
View file @
3515cb9b
...
...
@@ -43,14 +43,10 @@ describe Projects::ForkService do
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment