BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
861a5148
Commit
861a5148
authored
Sep 05, 2012
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add specs for a couple more Repository methods used by discover_default_branch
parent
443e23e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
repository_spec.rb
spec/roles/repository_spec.rb
+24
-0
No files found.
spec/roles/repository_spec.rb
View file @
861a5148
...
...
@@ -45,4 +45,28 @@ describe Project, "Repository" do
project
.
discover_default_branch
.
should
be_nil
end
end
describe
"#root_ref"
do
it
"returns default_branch when set"
do
project
.
default_branch
=
'stable'
project
.
root_ref
.
should
==
'stable'
end
it
"returns 'master' when default_branch is nil"
do
project
.
default_branch
=
nil
project
.
root_ref
.
should
==
'master'
end
end
describe
"#root_ref?"
do
it
"returns true when branch is root_ref"
do
project
.
default_branch
=
'stable'
project
.
root_ref?
(
'stable'
).
should
be_true
end
it
"returns false when branch is not root_ref"
do
project
.
default_branch
=
nil
project
.
root_ref?
(
'stable'
).
should
be_false
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