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
iv
gitlab-ce
Commits
18b17072
Commit
18b17072
authored
Jan 06, 2016
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add regression test.
parent
37ce5f31
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
spec/models/note_spec.rb
spec/models/note_spec.rb
+14
-1
No files found.
spec/models/note_spec.rb
View file @
18b17072
...
...
@@ -125,6 +125,19 @@ describe Note, models: true do
let
(
:set_mentionable_text
)
{
->
(
txt
)
{
subject
.
note
=
txt
}
}
end
describe
"#all_references"
do
let!
(
:note1
)
{
create
(
:note
)
}
let!
(
:note2
)
{
create
(
:note
)
}
it
"reads the rendered note body from the cache"
do
expect
(
Banzai
::
Renderer
).
to
receive
(
:render
).
with
(
note1
.
note
,
pipeline: :note
,
cache_key:
[
note1
,
"note"
],
project:
note1
.
project
)
expect
(
Banzai
::
Renderer
).
to
receive
(
:render
).
with
(
note2
.
note
,
pipeline: :note
,
cache_key:
[
note2
,
"note"
],
project:
note2
.
project
)
note1
.
all_references
note2
.
all_references
end
end
describe
:search
do
let!
(
:note
)
{
create
(
:note
,
note:
"WoW"
)
}
...
...
@@ -164,7 +177,7 @@ describe Note, models: true do
expect
(
note
.
editable?
).
to
be_falsy
end
end
describe
"set_award!"
do
let
(
:issue
)
{
create
:issue
}
...
...
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