BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
5e01ae5a
Unverified
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
boards_controller_spec.rb
spec/controllers/projects/boards_controller_spec.rb
+6
-0
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