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
8a7aad77
Commit
8a7aad77
authored
Feb 18, 2016
by
Yorick Peterse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added specs for Repository#exists?
parent
54aa0969
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
spec/models/repository_spec.rb
spec/models/repository_spec.rb
+13
-0
No files found.
spec/models/repository_spec.rb
View file @
8a7aad77
...
...
@@ -229,6 +229,19 @@ describe Repository, models: true do
end
end
describe
'#exists?'
do
it
'returns true when a repository exists'
do
expect
(
repository
.
exists?
).
to
eq
(
true
)
end
it
'returns false when a repository does not exist'
do
expect
(
repository
.
raw_repository
).
to
receive
(
:rugged
).
and_raise
(
Gitlab
::
Git
::
Repository
::
NoRepository
)
expect
(
repository
.
exists?
).
to
eq
(
false
)
end
end
describe
'#has_visible_content?'
do
subject
{
repository
.
has_visible_content?
}
...
...
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