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
7cad12f7
Commit
7cad12f7
authored
Oct 02, 2013
by
Izaak Alpert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added more tests for archive api
Change-Id: I2b0752bc2593a944d42dde0ffe0ef9ce408228a5
parent
a00c534c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
spec/requests/api/repositories_spec.rb
spec/requests/api/repositories_spec.rb
+9
-0
No files found.
spec/requests/api/repositories_spec.rb
View file @
7cad12f7
...
...
@@ -229,6 +229,15 @@ describe API::API do
it
"should get the archive"
do
get
api
(
"/projects/
#{
project
.
id
}
/repository/archive"
,
user
)
response
.
status
.
should
==
200
response
.
content_type
.
should
==
'application/x-gzip'
storage_path
=
Rails
.
root
.
join
(
"tmp"
,
"repositories"
)
file_path
=
project
.
repository
.
archive_repo
(
nil
,
storage_path
)
file_path_compare
=
file_path
+
'compare'
File
.
open
(
file_path_compare
,
'wb'
){
|
f
|
f
.
write
(
response
.
body
)}
FileUtils
.
compare_file
(
file_path
,
file_path_compare
).
should
be_true
#cleanup
File
.
delete
(
file_path
)
File
.
delete
(
file_path_compare
)
end
it
"should return 404 for invalid sha"
do
...
...
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