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
Jérome Perrin
gitlab-ce
Commits
aefefbf1
Commit
aefefbf1
authored
7 years ago
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevents position update for image diff notes
parent
9200b500
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
app/models/diff_note.rb
app/models/diff_note.rb
+2
-1
changelogs/unreleased/issue_40058.yml
changelogs/unreleased/issue_40058.yml
+5
-0
spec/models/diff_note_spec.rb
spec/models/diff_note_spec.rb
+6
-0
No files found.
app/models/diff_note.rb
View file @
aefefbf1
...
...
@@ -18,7 +18,8 @@ class DiffNote < Note
validate
:positions_complete
validate
:verify_supported
before_validation
:set_original_position
,
:update_position
,
on: :create
before_validation
:set_original_position
,
on: :create
before_validation
:update_position
,
on: :create
,
if: :on_text?
before_validation
:set_line_code
after_save
:keep_around_commits
...
...
This diff is collapsed.
Click to expand it.
changelogs/unreleased/issue_40058.yml
0 → 100644
View file @
aefefbf1
---
title
:
Prevents position update for image diff notes
merge_request
:
author
:
type
:
fixed
This diff is collapsed.
Click to expand it.
spec/models/diff_note_spec.rb
View file @
aefefbf1
...
...
@@ -283,6 +283,12 @@ describe DiffNote do
expect
(
diff_line
).
to
be
nil
expect
(
subject
).
to
be_valid
end
it
"does not update the position"
do
expect
(
subject
).
not_to
receive
(
:update_position
)
subject
.
save
end
end
it
"returns true for on_image?"
do
...
...
This diff is collapsed.
Click to expand it.
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