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
ec7821d8
Commit
ec7821d8
authored
May 23, 2019
by
egrieff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test that upload links are rewritten for new notes
parent
ae1bc2fd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
spec/services/issuable/clone/content_rewriter_spec.rb
spec/services/issuable/clone/content_rewriter_spec.rb
+16
-0
No files found.
spec/services/issuable/clone/content_rewriter_spec.rb
View file @
ec7821d8
...
@@ -149,5 +149,21 @@ describe Issuable::Clone::ContentRewriter do
...
@@ -149,5 +149,21 @@ describe Issuable::Clone::ContentRewriter do
expect
(
new_note
.
author
).
to
eq
(
note
.
author
)
expect
(
new_note
.
author
).
to
eq
(
note
.
author
)
end
end
end
end
context
'notes with uploads'
do
let
(
:uploader
)
{
build
(
:file_uploader
,
project:
project1
)
}
let
(
:text
)
{
"Simple text with image:
#{
uploader
.
markdown_link
}
"
}
let!
(
:note
)
{
create
(
:note
,
noteable:
original_issue
,
note:
text
,
project:
project1
)
}
it
'rewrites note content correclty'
do
subject
.
execute
new_note
=
new_issue
.
notes
.
first
expect
(
note
.
note
).
to
match
(
/Simple text with image:
#{
FileUploader
::
MARKDOWN_PATTERN
}
/
)
expect
(
new_note
.
note
).
to
match
(
/Simple text with image:
#{
FileUploader
::
MARKDOWN_PATTERN
}
/
)
expect
(
note
.
note
).
not_to
eq
(
new_note
.
note
)
expect
(
note
.
note_html
).
not_to
eq
(
new_note
.
note_html
)
end
end
end
end
end
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