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
Léo-Paul Géneau
gitlab-ce
Commits
848f4980
Commit
848f4980
authored
Feb 12, 2018
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add entity and update spec
parent
de3edb71
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
lib/api/api.rb
lib/api/api.rb
+1
-0
lib/api/entities.rb
lib/api/entities.rb
+5
-0
spec/requests/api/project_import_spec.rb
spec/requests/api/project_import_spec.rb
+2
-2
No files found.
lib/api/api.rb
View file @
848f4980
...
...
@@ -138,6 +138,7 @@ module API
mount
::
API
::
PagesDomains
mount
::
API
::
Pipelines
mount
::
API
::
PipelineSchedules
mount
::
API
::
ProjectImport
mount
::
API
::
ProjectHooks
mount
::
API
::
Projects
mount
::
API
::
ProjectMilestones
...
...
lib/api/entities.rb
View file @
848f4980
...
...
@@ -90,6 +90,11 @@ module API
expose
:created_at
end
class
ProjectImportStatus
<
ProjectIdentity
expose
:import_status
expose
:import_error
,
if: :import_error
end
class
BasicProjectDetails
<
ProjectIdentity
include
::
API
::
ProjectsRelationBuilder
...
...
spec/requests/api/project_import_spec.rb
View file @
848f4980
...
...
@@ -33,7 +33,7 @@ describe API::ProjectImport do
get
api
(
"/projects/
#{
project
.
id
}
/import"
,
user
)
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
json_response
).
to
eq
(
'import_status'
=>
'started'
)
expect
(
json_response
).
to
include
(
'import_status'
=>
'started'
)
end
it
'returns the import status and the error if failed'
do
...
...
@@ -42,7 +42,7 @@ describe API::ProjectImport do
get
api
(
"/projects/
#{
project
.
id
}
/import"
,
user
)
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
json_response
).
to
eq
(
'import_status'
=>
'failed'
,
expect
(
json_response
).
to
include
(
'import_status'
=>
'failed'
,
'import_error'
=>
'error'
)
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