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
Tatuya Kamada
gitlab-ce
Commits
bd9887e6
Commit
bd9887e6
authored
Mar 01, 2017
by
Jose Ivan Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed repository_controller_spec
also added an #open_branches private method
parent
43958926
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
app/controllers/projects/settings/repository_controller.rb
app/controllers/projects/settings/repository_controller.rb
+7
-4
spec/controllers/projects/settings/repository_controller_spec.rb
...ntrollers/projects/settings/repository_controller_spec.rb
+1
-1
No files found.
app/controllers/projects/settings/repository_controller.rb
View file @
bd9887e6
...
...
@@ -5,7 +5,7 @@ module Projects
def
show
@deploy_keys
=
DeployKeysPresenter
.
new
(
@project
,
current_user:
@
current_user
)
.
new
(
@project
,
current_user:
current_user
)
define_protected_branches
end
...
...
@@ -37,10 +37,13 @@ module Projects
}
end
def
open_branches
branches
=
@project
.
open_branches
.
map
{
|
br
|
{
text:
br
.
name
,
id:
br
.
name
,
title:
br
.
name
}
}
{
open_branches:
branches
}
end
def
load_gon_index
open_branches
=
@project
.
open_branches
.
map
{
|
br
|
{
text:
br
.
name
,
id:
br
.
name
,
title:
br
.
name
}
}
params
=
{
open_branches:
open_branches
}
gon
.
push
(
params
.
merge
(
access_levels_options
))
gon
.
push
(
open_branches
.
merge
(
access_levels_options
))
end
end
end
...
...
spec/controllers/projects/settings/repository_controller_spec.rb
View file @
bd9887e6
require
'spec_helper'
describe
Projects
::
Settings
::
RepositoryController
do
let
(
:project
)
{
create
(
:
empty_project
,
:public
)
}
let
(
:project
)
{
create
(
:
project_empty_repo
,
:public
)
}
let
(
:user
)
{
create
(
:user
)
}
before
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