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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
e228453f
Commit
e228453f
authored
Mar 07, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated spec
parent
f9eb3fc0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
4 deletions
+20
-4
spec/services/projects/import_export/project_tree_saver_spec.rb
...ervices/projects/import_export/project_tree_saver_spec.rb
+20
-4
No files found.
spec/services/projects/import_export/project_tree_saver_spec.rb
View file @
e228453f
...
@@ -4,7 +4,8 @@ describe Projects::ImportExport::ProjectTreeSaver, services: true do
...
@@ -4,7 +4,8 @@ describe Projects::ImportExport::ProjectTreeSaver, services: true do
describe
:save
do
describe
:save
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let!
(
:project
)
{
create
(
:project
,
:public
,
name:
'searchable_project'
)
}
let
(
:issue
)
{
create
(
:issue
,
assignee:
user
)
}
let!
(
:project
)
{
create
(
:project
,
:public
,
name:
'searchable_project'
,
issues:
[
issue
]
)}
let
(
:export_path
)
{
"
#{
Dir
::
tmpdir
}
/project_tree_saver_spec"
}
let
(
:export_path
)
{
"
#{
Dir
::
tmpdir
}
/project_tree_saver_spec"
}
let
(
:project_tree_saver
)
{
Projects
::
ImportExport
::
ProjectTreeSaver
.
new
(
project:
project
)
}
let
(
:project_tree_saver
)
{
Projects
::
ImportExport
::
ProjectTreeSaver
.
new
(
project:
project
)
}
...
@@ -21,9 +22,24 @@ describe Projects::ImportExport::ProjectTreeSaver, services: true do
...
@@ -21,9 +22,24 @@ describe Projects::ImportExport::ProjectTreeSaver, services: true do
expect
(
project_tree_saver
.
save
).
to
be
true
expect
(
project_tree_saver
.
save
).
to
be
true
end
end
it
'saves the correct json'
do
context
'JSON'
do
project_tree_saver
.
save
expect
(
project_json
(
project_tree_saver
.
full_path
)).
to
include
({
"name"
=>
project
.
name
})
let
(
:saved_project_json
)
do
project_tree_saver
.
save
project_json
(
project_tree_saver
.
full_path
)
end
it
'saves the correct json'
do
expect
(
saved_project_json
).
to
include
({
"name"
=>
project
.
name
})
end
it
'has events'
do
expect
(
saved_project_json
[
'events'
]).
not_to
be_empty
end
it
'has issues'
do
expect
(
saved_project_json
[
'issues'
]).
not_to
be_empty
end
end
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