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
f1abcd14
Commit
f1abcd14
authored
Nov 27, 2020
by
Coung Ngo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve issue_header_spec.rb test
parent
3e693d08
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
22 deletions
+3
-22
spec/features/issues/issue_header_spec.rb
spec/features/issues/issue_header_spec.rb
+3
-22
No files found.
spec/features/issues/issue_header_spec.rb
View file @
f1abcd14
...
...
@@ -8,6 +8,7 @@ RSpec.describe 'issue header', :js do
let_it_be
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let_it_be
(
:closed_issue
)
{
create
(
:issue
,
:closed
,
project:
project
)
}
let_it_be
(
:closed_locked_issue
)
{
create
(
:issue
,
:closed
,
:locked
,
project:
project
)
}
let_it_be
(
:authored_issue
)
{
create
(
:issue
,
project:
project
,
author:
user
)
}
context
'when user has permission to update'
do
before
do
...
...
@@ -23,15 +24,9 @@ RSpec.describe 'issue header', :js do
click_button
'Issue actions'
end
it
'
has "New issue" item'
do
it
'
only shows the "New issue" and "Report abuse" items'
,
:aggregate_failures
do
expect
(
page
).
to
have_link
'New issue'
end
it
'has "Report abuse" item'
do
expect
(
page
).
to
have_link
'Report abuse'
end
it
'does not have "Submit as spam" item'
do
expect
(
page
).
not_to
have_link
'Submit as spam'
end
end
...
...
@@ -67,11 +62,7 @@ RSpec.describe 'issue header', :js do
end
context
'when the current user is the issue author'
do
let
(
:authored_issue
)
{
create
(
:issue
,
project:
project
)
}
before
do
authored_issue
.
update!
(
author:
user
)
visit
project_issue_path
(
project
,
authored_issue
)
end
...
...
@@ -121,15 +112,9 @@ RSpec.describe 'issue header', :js do
click_button
'Issue actions'
end
it
'
has "New issue" item'
do
it
'
only shows the "New issue" and "Report abuse" items'
,
:aggregate_failures
do
expect
(
page
).
to
have_link
'New issue'
end
it
'has "Report abuse" item'
do
expect
(
page
).
to
have_link
'Report abuse'
end
it
'does not have "Submit as spam" item'
do
expect
(
page
).
not_to
have_link
'Submit as spam'
end
end
...
...
@@ -165,11 +150,7 @@ RSpec.describe 'issue header', :js do
end
context
'when the current user is the issue author'
do
let
(
:authored_issue
)
{
create
(
:issue
,
project:
project
)
}
before
do
authored_issue
.
update!
(
author:
user
)
visit
project_issue_path
(
project
,
authored_issue
)
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