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
Boxiang Sun
gitlab-ce
Commits
c3f93385
Commit
c3f93385
authored
Nov 08, 2018
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DRY up tests
parent
8f016690
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
16 deletions
+13
-16
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+13
-16
No files found.
spec/features/issues_spec.rb
View file @
c3f93385
...
...
@@ -8,6 +8,17 @@ describe 'Issues' do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:public
)
}
shared_examples_for
'empty state with filters'
do
it
'user sees empty state with filters'
do
create
(
:issue
,
author:
user
,
project:
project
)
visit
project_issues_path
(
project
,
milestone_title:
"1.0"
)
expect
(
page
).
to
have_content
(
'Sorry, your filter produced no results'
)
expect
(
page
).
to
have_content
(
'To widen your search, change or remove filters in the filter bar above'
)
end
end
describe
'while user is signed out'
do
describe
'empty state'
do
it
'user sees empty state'
do
...
...
@@ -18,14 +29,7 @@ describe 'Issues' do
expect
(
page
).
to
have_content
(
'You can register or sign in to create issues for this project.'
)
end
it
'user sees empty state with filters'
do
create
(
:issue
,
author:
user
,
project:
project
)
visit
project_issues_path
(
project
,
milestone_title:
"1.0"
)
expect
(
page
).
to
have_content
(
'Sorry, your filter produced no results'
)
expect
(
page
).
to
have_content
(
'To widen your search, change or remove filters in the filter bar above'
)
end
it_behaves_like
'empty state with filters'
end
end
...
...
@@ -47,14 +51,7 @@ describe 'Issues' do
expect
(
page
).
to
have_content
(
'New issue'
)
end
it
'user sees empty state with filters'
do
create
(
:issue
,
author:
user
,
project:
project
)
visit
project_issues_path
(
project
,
milestone_title:
"1.0"
)
expect
(
page
).
to
have_content
(
'Sorry, your filter produced no results'
)
expect
(
page
).
to
have_content
(
'To widen your search, change or remove filters in the filter bar above'
)
end
it_behaves_like
'empty state with filters'
end
describe
'Edit issue'
do
...
...
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