BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
aefefbf1
Commit
aefefbf1
authored
Nov 13, 2017
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevents position update for image diff notes
parent
9200b500
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
diff_note.rb
app/models/diff_note.rb
+2
-1
issue_40058.yml
changelogs/unreleased/issue_40058.yml
+5
-0
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
...
...
changelogs/unreleased/issue_40058.yml
0 → 100644
View file @
aefefbf1
---
title
:
Prevents position update for image diff notes
merge_request
:
author
:
type
:
fixed
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
...
...
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