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
d9b1585b
Commit
d9b1585b
authored
Jun 29, 2020
by
charlieablett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply reviewer feedback
- Add test for reopened moved issue
parent
ccf8ff77
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
app/views/projects/issues/_issue.html.haml
app/views/projects/issues/_issue.html.haml
+1
-1
spec/features/issues/user_views_issues_spec.rb
spec/features/issues/user_views_issues_spec.rb
+5
-0
spec/views/projects/issues/show.html.haml_spec.rb
spec/views/projects/issues/show.html.haml_spec.rb
+8
-0
No files found.
app/views/projects/issues/_issue.html.haml
View file @
d9b1585b
...
...
@@ -47,7 +47,7 @@
.issuable-meta
%ul
.controls
-
if
issue
.
moved?
&&
issue
.
clos
ed?
-
if
issue
.
closed?
&&
issue
.
mov
ed?
%li
.issuable-status
=
_
(
'CLOSED (MOVED)'
)
-
elsif
issue
.
closed?
...
...
spec/features/issues/user_views_issues_spec.rb
View file @
d9b1585b
...
...
@@ -6,6 +6,7 @@ describe "User views issues" do
let!
(
:closed_issue
)
{
create
(
:closed_issue
,
project:
project
)
}
let!
(
:open_issue1
)
{
create
(
:issue
,
project:
project
)
}
let!
(
:open_issue2
)
{
create
(
:issue
,
project:
project
)
}
let!
(
:moved_open_issue
)
{
create
(
:issue
,
project:
project
,
moved_to:
create
(
:issue
))
}
let_it_be
(
:user
)
{
create
(
:user
)
}
...
...
@@ -32,6 +33,7 @@ describe "User views issues" do
.
and
have_content
(
open_issue1
.
title
)
.
and
have_content
(
open_issue2
.
title
)
.
and
have_no_content
(
closed_issue
.
title
)
.
and
have_content
(
moved_open_issue
.
title
)
.
and
have_no_selector
(
".js-new-board-list"
)
end
...
...
@@ -62,6 +64,7 @@ describe "User views issues" do
.
and
have_content
(
closed_issue
.
title
)
.
and
have_no_content
(
open_issue1
.
title
)
.
and
have_no_content
(
open_issue2
.
title
)
.
and
have_no_content
(
moved_open_issue
.
title
)
.
and
have_no_selector
(
".js-new-board-list"
)
end
...
...
@@ -82,6 +85,8 @@ describe "User views issues" do
.
and
have_content
(
closed_issue
.
title
)
.
and
have_content
(
open_issue1
.
title
)
.
and
have_content
(
open_issue2
.
title
)
.
and
have_content
(
moved_open_issue
.
title
)
.
and
have_no_content
(
'CLOSED (MOVED)'
)
.
and
have_no_selector
(
".js-new-board-list"
)
end
...
...
spec/views/projects/issues/show.html.haml_spec.rb
View file @
d9b1585b
...
...
@@ -41,6 +41,14 @@ describe 'projects/issues/show' do
expect
(
rendered
).
to
have_selector
(
"a[href=
\"
#{
issue_path
(
new_issue
)
}
\"
]"
,
text:
'moved'
)
end
it
'does not show "closed (moved)" if an issue has been moved and reopened (not closed)'
do
allow
(
issue
).
to
receive
(
:closed?
).
and_return
(
false
)
render
expect
(
rendered
).
not_to
have_selector
(
'.status-box-issue-closed:not(.hidden)'
,
text:
'Closed (moved)'
)
end
end
context
'when user cannot see moved 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