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
6da02525
Commit
6da02525
authored
Sep 20, 2021
by
Gary Holtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding some additional specs
parent
7abd7d2d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
spec/models/note_spec.rb
spec/models/note_spec.rb
+19
-2
No files found.
spec/models/note_spec.rb
View file @
6da02525
...
...
@@ -109,14 +109,31 @@ RSpec.describe Note do
describe
'callbacks'
do
describe
'#keep_around_commit'
do
it
'skips #keep_around_commit if `skip_keep_around_commits` is true '
do
noteable
=
create
(
:issue
)
let!
(
:noteable
)
{
create
(
:issue
)
}
it
"calls #keep_around_commit normally"
do
note
=
build
(
:note
,
project:
noteable
.
project
,
noteable:
noteable
)
expect
(
note
).
to
receive
(
:keep_around_commit
)
note
.
save!
end
it
"skips #keep_around_commit if 'skip_keep_around_commits' is true"
do
note
=
build
(
:note
,
project:
noteable
.
project
,
noteable:
noteable
,
skip_keep_around_commits:
true
)
expect
(
note
).
not_to
receive
(
:keep_around_commit
)
note
.
save!
end
it
"skips #keep_around_commit if 'importing' is true"
do
note
=
build
(
:note
,
project:
noteable
.
project
,
noteable:
noteable
,
importing:
true
)
expect
(
note
).
not_to
receive
(
:keep_around_commit
)
note
.
save!
end
end
describe
'#notify_after_create'
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