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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
38d6bc77
Commit
38d6bc77
authored
Apr 28, 2016
by
Alfredo Sumaran
Committed by
Jacob Schatz
May 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for Todos target's state
parent
33be8181
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
84 additions
and
0 deletions
+84
-0
spec/features/todos/target_state_todos_spec.rb
spec/features/todos/target_state_todos_spec.rb
+84
-0
No files found.
spec/features/todos/target_state_todos_spec.rb
0 → 100644
View file @
38d6bc77
require
'rails_helper'
describe
'Todos > Target State Labels'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:author
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:issue_open
)
{
create
(
:issue
)
}
let
(
:issue_closed
)
{
create
(
:issue
,
state:
'closed'
)
}
let
(
:mr_open
)
{
create
(
:merge_request
,
:simple
,
author:
user
)
}
let
(
:mr_merged
)
{
create
(
:merge_request
,
:simple
,
author:
user
,
state:
'merged'
)
}
let
(
:mr_closed
)
{
create
(
:merge_request
,
:simple
,
author:
user
,
state:
'closed'
)
}
describe
'GET /dashboard/todos'
do
context
'On a todo for a Closed Issue'
do
before
do
create
(
:todo
,
:mentioned
,
user:
user
,
project:
project
,
target:
issue_closed
,
author:
author
)
login_as
user
visit
dashboard_todos_path
end
it
'has closed label'
do
page
.
within
'.todos-list'
do
expect
(
page
).
to
have_content
(
'Closed'
)
end
end
end
context
'On a todo for a Open Issue'
do
before
do
create
(
:todo
,
:mentioned
,
user:
user
,
project:
project
,
target:
issue_open
,
author:
author
)
login_as
user
visit
dashboard_todos_path
end
it
'does not have a open label'
do
page
.
within
'.todos-list'
do
expect
(
page
).
not_to
have_content
(
'Open'
)
end
end
end
context
'On a todo for a merged Merge Request'
do
before
do
create
(
:todo
,
:mentioned
,
user:
user
,
project:
project
,
target:
mr_merged
,
author:
author
)
login_as
user
visit
dashboard_todos_path
end
it
'has merged label'
do
page
.
within
'.todos-list'
do
expect
(
page
).
to
have_content
(
'Merged'
)
end
end
end
context
'On a todo for a closed Merge Request'
do
before
do
create
(
:todo
,
:mentioned
,
user:
user
,
project:
project
,
target:
mr_closed
,
author:
author
)
login_as
user
visit
dashboard_todos_path
end
it
'has closed label'
do
page
.
within
'.todos-list'
do
expect
(
page
).
to
have_content
(
'Closed'
)
end
end
end
context
'On a todo for a open Merge Request'
do
before
do
create
(
:todo
,
:mentioned
,
user:
user
,
project:
project
,
target:
mr_open
,
author:
author
)
login_as
user
visit
dashboard_todos_path
end
it
'does not have a open label'
do
page
.
within
'.todos-list'
do
expect
(
page
).
not_to
have_content
(
'Open'
)
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