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
Boxiang Sun
gitlab-ce
Commits
9bfa690b
Commit
9bfa690b
authored
Feb 09, 2018
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add project import spec
parent
de67c597
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
spec/requests/api/project_import_spec.rb
spec/requests/api/project_import_spec.rb
+25
-0
No files found.
spec/requests/api/project_import_spec.rb
0 → 100644
View file @
9bfa690b
require
'spec_helper'
describe
API
::
ProjectImport
do
let
(
:export_path
)
{
"
#{
Dir
.
tmpdir
}
/project_export_spec"
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:file
)
{
File
.
join
(
Rails
.
root
,
'spec'
,
'features'
,
'projects'
,
'import_export'
,
'test_project_export.tar.gz'
)
}
let
(
:namespace
){
create
(
:group
)
}
before
do
allow_any_instance_of
(
Gitlab
::
ImportExport
).
to
receive
(
:storage_path
).
and_return
(
export_path
)
group
.
add_owner
(
user
)
end
after
do
FileUtils
.
rm_rf
(
export_path
,
secure:
true
)
end
it
'schedules an import'
do
expect_any_instance_of
(
Project
).
to
receive
(
:import_schedule
)
post
"/projects/import"
,
file:
file
,
namespace:
namespace
.
full_path
expect
(
project
.
status
).
to
eq
(
'started'
)
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