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
Léo-Paul Géneau
gitlab-ce
Commits
4e40d72a
Commit
4e40d72a
authored
Jan 25, 2019
by
Brett Walker
Committed by
Fatih Acet
Jan 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added changelog and danger fixes
parent
dfeb412d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
changelogs/unreleased/19745-forms-with-task-lists-can-be-overwritten-when-editing-simultaneously.yml
...-lists-can-be-overwritten-when-editing-simultaneously.yml
+5
-0
spec/services/issues/update_service_spec.rb
spec/services/issues/update_service_spec.rb
+4
-4
spec/services/task_list_toggle_service_spec.rb
spec/services/task_list_toggle_service_spec.rb
+2
-0
No files found.
changelogs/unreleased/19745-forms-with-task-lists-can-be-overwritten-when-editing-simultaneously.yml
0 → 100644
View file @
4e40d72a
---
title
:
Increase reliability and performance of clicking task items
merge_request
:
23938
author
:
type
:
fixed
spec/services/issues/update_service_spec.rb
View file @
4e40d72a
...
...
@@ -552,7 +552,7 @@ describe Issues::UpdateService, :mailer do
context
'when a task is marked as completed'
do
before
do
update_issue
(
update_task:
{
index:
1
,
checked:
true
,
line_source:
'- [ ] Task 1'
,
line_number:
1
})
update_issue
(
update_task:
{
index:
1
,
checked:
true
,
line_source:
'- [ ] Task 1'
,
line_number:
1
})
end
it
'creates system note about task status change'
do
...
...
@@ -568,7 +568,7 @@ describe Issues::UpdateService, :mailer do
context
'when a task is marked as incomplete'
do
before
do
update_issue
(
description:
"- [x] Task 1
\n
- [X] Task 2"
)
update_issue
(
update_task:
{
index:
2
,
checked:
false
,
line_source:
'- [X] Task 2'
,
line_number:
2
})
update_issue
(
update_task:
{
index:
2
,
checked:
false
,
line_source:
'- [X] Task 2'
,
line_number:
2
})
end
it
'creates system note about task status change'
do
...
...
@@ -589,7 +589,7 @@ describe Issues::UpdateService, :mailer do
it
'raises an exception'
do
expect
(
Note
.
count
).
to
eq
(
2
)
expect
do
update_issue
(
update_task:
{
index:
2
,
checked:
true
,
line_source:
'- [ ] Task 2'
,
line_number:
2
})
update_issue
(
update_task:
{
index:
2
,
checked:
true
,
line_source:
'- [ ] Task 2'
,
line_number:
2
})
end
.
to
raise_error
(
ActiveRecord
::
StaleObjectError
)
expect
(
Note
.
count
).
to
eq
(
2
)
end
...
...
@@ -599,7 +599,7 @@ describe Issues::UpdateService, :mailer do
before
do
update_issue
(
description:
"Paragraph
\n\n
- [ ] Task 1
\n
- [x] Task 2"
)
update_issue
(
description:
"Paragraph with more words
\n\n
- [ ] Task 1
\n
- [x] Task 2"
)
update_issue
(
update_task:
{
index:
2
,
checked:
false
,
line_source:
'- [x] Task 2'
,
line_number:
4
})
update_issue
(
update_task:
{
index:
2
,
checked:
false
,
line_source:
'- [x] Task 2'
,
line_number:
4
})
end
it
'creates system note about task status change'
do
...
...
spec/services/task_list_toggle_service_spec.rb
View file @
4e40d72a
# frozen_string_literal: true
require
'spec_helper'
describe
TaskListToggleService
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