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
5e01ae5a
Commit
5e01ae5a
authored
Dec 03, 2017
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add boards_helper_spec
parent
e63d73cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
spec/controllers/projects/boards_controller_spec.rb
spec/controllers/projects/boards_controller_spec.rb
+6
-0
spec/helpers/boards_helper_spec.rb
spec/helpers/boards_helper_spec.rb
+21
-0
No files found.
spec/controllers/projects/boards_controller_spec.rb
View file @
5e01ae5a
...
...
@@ -65,6 +65,12 @@ describe Projects::BoardsController do
describe
'GET show'
do
let!
(
:board
)
{
create
(
:board
,
project:
project
)
}
it
'sets boards_endpoint instance variable to a boards path'
do
read_board
board:
board
expect
(
assigns
(
:boards_endpoint
)).
to
eq
project_boards_path
(
project
)
end
context
'when format is HTML'
do
it
'renders template'
do
read_board
board:
board
...
...
spec/helpers/boards_helper_spec.rb
0 → 100644
View file @
5e01ae5a
require
'spec_helper'
describe
BoardsHelper
do
describe
'#board_data'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:board
)
{
create
(
:board
,
project:
project
)
}
before
do
assign
(
:board
,
board
)
assign
(
:project
,
project
)
allow
(
helper
).
to
receive
(
:current_user
)
{
user
}
allow
(
helper
).
to
receive
(
:can?
).
with
(
user
,
:admin_list
,
project
).
and_return
(
true
)
end
it
'returns a board_lists_path as lists_endpoint'
do
expect
(
helper
.
board_data
[
:lists_endpoint
]).
to
eq
(
board_lists_path
(
board
))
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