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
4b3f3167
Commit
4b3f3167
authored
8 years ago
by
tiagonbotelho
Committed by
Yorick Peterse
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implements test to simulate empty repo
parent
d72e6ad2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
spec/models/repository_spec.rb
spec/models/repository_spec.rb
+6
-0
No files found.
spec/models/repository_spec.rb
View file @
4b3f3167
...
...
@@ -600,5 +600,11 @@ describe Repository, models: true do
it
'shows the main language of the project'
do
expect
(
repository
.
main_language
).
to
eq
(
"Ruby"
)
end
it
'returns nil when the repository is empty'
do
allow
(
repository
).
to
receive
(
:empty?
).
and_return
(
true
)
expect
(
repository
.
main_language
).
to
be_nil
end
end
end
This diff is collapsed.
Click to expand it.
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