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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
ff04bc3f
Commit
ff04bc3f
authored
Oct 13, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Redirects user back to issue boards index after deleting a board
parent
28c73326
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
app/controllers/projects/boards_controller.rb
app/controllers/projects/boards_controller.rb
+3
-4
spec/controllers/projects/boards_controller_spec.rb
spec/controllers/projects/boards_controller_spec.rb
+3
-3
No files found.
app/controllers/projects/boards_controller.rb
View file @
ff04bc3f
...
@@ -57,11 +57,10 @@ class Projects::BoardsController < Projects::ApplicationController
...
@@ -57,11 +57,10 @@ class Projects::BoardsController < Projects::ApplicationController
def
destroy
def
destroy
service
=
::
Boards
::
DestroyService
.
new
(
project
,
current_user
)
service
=
::
Boards
::
DestroyService
.
new
(
project
,
current_user
)
service
.
execute
(
@board
)
if
service
.
execute
(
@board
)
respond_to
do
|
format
|
redirect_to
namespace_project_boards_path
(
@project
.
namespace
,
@project
)
format
.
html
{
redirect_to
namespace_project_boards_path
(
@project
.
namespace
,
@project
)
}
else
head
:unprocessable_entity
end
end
end
end
...
...
spec/controllers/projects/boards_controller_spec.rb
View file @
ff04bc3f
...
@@ -242,10 +242,10 @@ describe Projects::BoardsController do
...
@@ -242,10 +242,10 @@ describe Projects::BoardsController do
let!
(
:board
)
{
create
(
:board
,
project:
project
)
}
let!
(
:board
)
{
create
(
:board
,
project:
project
)
}
context
'with valid board id'
do
context
'with valid board id'
do
it
're
turns a successful 200 respons
e'
do
it
're
directs to the issue boards pag
e'
do
remove_board
board:
board
remove_board
board:
board
expect
(
response
).
to
have_http_status
(
200
)
expect
(
response
).
to
redirect_to
(
namespace_project_boards_path
(
project
.
namespace
,
project
)
)
end
end
it
'removes board from project'
do
it
'removes board from project'
do
...
@@ -278,7 +278,7 @@ describe Projects::BoardsController do
...
@@ -278,7 +278,7 @@ describe Projects::BoardsController do
delete
:destroy
,
namespace_id:
project
.
namespace
.
to_param
,
delete
:destroy
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
,
project_id:
project
.
to_param
,
id:
board
.
to_param
,
id:
board
.
to_param
,
format: :
json
format: :
html
end
end
end
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