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
6e92d902
Commit
6e92d902
authored
Jun 07, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add repository spec
parent
1d749356
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
spec/lib/gitlab/backup/repository_spec.rb
spec/lib/gitlab/backup/repository_spec.rb
+35
-0
No files found.
spec/lib/gitlab/backup/repository_spec.rb
0 → 100644
View file @
6e92d902
require
'spec_helper'
describe
Backup
::
Repository
,
lib:
true
do
include
StubENV
let
(
:progress
)
{
StringIO
.
new
}
let!
(
:project
)
{
create
(
:empty_project
)
}
before
do
allow
(
progress
).
to
receive
(
:puts
)
allow
(
progress
).
to
receive
(
:print
)
allow_any_instance_of
(
String
).
to
receive
(
:color
)
do
|
string
,
_color
|
string
end
@old_progress
=
$progress
# rubocop:disable Style/GlobalVars
$progress
=
progress
# rubocop:disable Style/GlobalVars
end
after
do
$progress
=
@old_progress
# rubocop:disable Style/GlobalVars
end
describe
'repo failure'
do
before
do
allow_any_instance_of
(
Project
).
to
receive
(
:empty_repo?
).
and_raise
(
Rugged
::
OdbError
)
allow
(
Gitlab
::
Popen
).
to
receive
(
:popen
).
and_return
([
'normal output'
,
0
])
end
it
'does not raise error'
do
expect
{
described_class
.
new
.
dump
}.
not_to
raise_error
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