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
90f45e76
Commit
90f45e76
authored
Jun 25, 2018
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CE-EE parity for spec/models/repository_spec.rb
parent
eb0416ae
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
7 deletions
+29
-7
spec/models/repository_spec.rb
spec/models/repository_spec.rb
+29
-7
No files found.
spec/models/repository_spec.rb
View file @
90f45e76
...
@@ -2294,6 +2294,28 @@ describe Repository do
...
@@ -2294,6 +2294,28 @@ describe Repository do
end
end
end
end
describe
'#local_branches'
do
it
'returns the local branches'
do
masterrev
=
repository
.
find_branch
(
'master'
).
dereferenced_target
create_remote_branch
(
'joe'
,
'remote_branch'
,
masterrev
)
repository
.
add_branch
(
user
,
'local_branch'
,
masterrev
.
id
)
expect
(
repository
.
local_branches
.
any?
{
|
branch
|
branch
.
name
==
'remote_branch'
}).
to
eq
(
false
)
expect
(
repository
.
local_branches
.
any?
{
|
branch
|
branch
.
name
==
'local_branch'
}).
to
eq
(
true
)
end
end
describe
'#remote_branches'
do
it
'returns the remote branches'
do
masterrev
=
repository
.
find_branch
(
'master'
).
dereferenced_target
create_remote_branch
(
'joe'
,
'remote_branch'
,
masterrev
)
repository
.
add_branch
(
user
,
'local_branch'
,
masterrev
.
id
)
expect
(
repository
.
remote_branches
(
'joe'
).
any?
{
|
branch
|
branch
.
name
==
'local_branch'
}).
to
eq
(
false
)
expect
(
repository
.
remote_branches
(
'joe'
).
any?
{
|
branch
|
branch
.
name
==
'remote_branch'
}).
to
eq
(
true
)
end
end
describe
'#commit_count'
do
describe
'#commit_count'
do
context
'with a non-existing repository'
do
context
'with a non-existing repository'
do
it
'returns 0'
do
it
'returns 0'
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