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
6256547a
Commit
6256547a
authored
Aug 03, 2021
by
Mikołaj Wawrzyniak
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ld-tidup-specs' into 'master'
Tidup WebHook specs See merge request gitlab-org/gitlab!67286
parents
acc2b815
da19b619
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
spec/models/hooks/web_hook_spec.rb
spec/models/hooks/web_hook_spec.rb
+5
-4
No files found.
spec/models/hooks/web_hook_spec.rb
View file @
6256547a
...
...
@@ -289,7 +289,7 @@ RSpec.describe WebHook do
expect
{
hook
.
enable!
}.
to
change
(
hook
,
:executable?
).
from
(
false
).
to
(
true
)
end
it
'does not update hooks unless necessary'
,
:aggregate_failures
do
it
'does not update hooks unless necessary'
do
sql_count
=
ActiveRecord
::
QueryRecorder
.
new
{
hook
.
enable!
}.
count
expect
(
sql_count
).
to
eq
(
0
)
...
...
@@ -331,11 +331,12 @@ RSpec.describe WebHook do
expect
{
hook
.
failed!
}.
to
change
(
hook
,
:recent_failures
).
by
(
1
)
end
it
'does not
allow the failure count to exceed the maximum value'
,
:aggregate_failures
do
it
'does not
update the hook if the the failure count exceeds the maximum value'
do
hook
.
recent_failures
=
described_class
::
MAX_FAILURES
expect
{
hook
.
failed!
}.
not_to
change
(
hook
,
:recent_failures
)
expect
(
hook
).
not_to
be_persisted
sql_count
=
ActiveRecord
::
QueryRecorder
.
new
{
hook
.
failed!
}.
count
expect
(
sql_count
).
to
eq
(
0
)
end
include_examples
'is tolerant of invalid records'
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