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
Jérome Perrin
gitlab-ce
Commits
e76a30c7
Commit
e76a30c7
authored
Oct 25, 2016
by
Alejandro Rodríguez
Committed by
Stan Hu
May 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing project import job example from gitlab-ee
parent
bd259d6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
spec/models/project_spec.rb
spec/models/project_spec.rb
+20
-0
No files found.
spec/models/project_spec.rb
View file @
e76a30c7
...
@@ -1431,6 +1431,26 @@ describe Project, models: true do
...
@@ -1431,6 +1431,26 @@ describe Project, models: true do
end
end
end
end
describe
'Project import job'
do
let
(
:project
)
{
create
(
:empty_project
)
}
let
(
:mirror
)
{
false
}
before
do
allow_any_instance_of
(
Gitlab
::
Shell
).
to
receive
(
:import_repository
).
with
(
project
.
repository_storage_path
,
project
.
path_with_namespace
,
project
.
import_url
).
and_return
(
true
)
allow
(
project
).
to
receive
(
:repository_exists?
).
and_return
(
true
)
allow_any_instance_of
(
Repository
).
to
receive
(
:build_cache
).
and_return
(
true
)
end
it
'imports a project'
do
expect_any_instance_of
(
RepositoryImportWorker
).
to
receive
(
:perform
).
and_call_original
project
.
import_start
project
.
add_import_job
expect
(
project
.
reload
.
import_status
).
to
eq
(
'finished'
)
end
end
describe
'#latest_successful_builds_for'
do
describe
'#latest_successful_builds_for'
do
def
create_pipeline
(
status
=
'success'
)
def
create_pipeline
(
status
=
'success'
)
create
(
:ci_pipeline
,
project:
project
,
create
(
:ci_pipeline
,
project:
project
,
...
...
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