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
a84176ba
Commit
a84176ba
authored
Aug 01, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Creates a new board when project does not have one
parent
76499374
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
app/controllers/projects/boards_controller.rb
app/controllers/projects/boards_controller.rb
+2
-0
spec/controllers/projects/boards_controller_spec.rb
spec/controllers/projects/boards_controller_spec.rb
+4
-0
No files found.
app/controllers/projects/boards_controller.rb
View file @
a84176ba
class
Projects::BoardsController
<
Projects
::
ApplicationController
class
Projects::BoardsController
<
Projects
::
ApplicationController
def
show
def
show
Boards
::
CreateService
.
new
(
project
).
execute
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
format
.
html
end
end
...
...
spec/controllers/projects/boards_controller_spec.rb
View file @
a84176ba
...
@@ -10,6 +10,10 @@ describe Projects::BoardsController do
...
@@ -10,6 +10,10 @@ describe Projects::BoardsController do
end
end
describe
'GET #show'
do
describe
'GET #show'
do
it
'creates a new board when project does not have one'
do
expect
{
get
:show
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
}.
to
change
(
Board
,
:count
).
by
(
1
)
end
it
'renders HTML template'
do
it
'renders HTML template'
do
get
:show
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
get
:show
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
...
...
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