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
583ec932
Commit
583ec932
authored
Mar 27, 2020
by
charlieablett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tiny refactor of spam tests
parent
3c6ac64e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
spec/services/spam/spam_check_service_spec.rb
spec/services/spam/spam_check_service_spec.rb
+4
-4
No files found.
spec/services/spam/spam_check_service_spec.rb
View file @
583ec932
...
...
@@ -103,7 +103,7 @@ describe Spam::SpamCheckService do
issue
.
description
=
'SPAM!'
end
context
'when indicated as spam by
a
kismet'
do
context
'when indicated as spam by
A
kismet'
do
before
do
allow
(
Spam
::
AkismetService
).
to
receive
(
:new
).
and_return
(
double
(
spam?:
true
))
end
...
...
@@ -115,7 +115,7 @@ describe Spam::SpamCheckService do
it_behaves_like
'akismet spam'
it
'
chec
ks as spam'
do
it
'
mar
ks as spam'
do
subject
expect
(
issue
.
reload
.
spam
).
to
be_truthy
...
...
@@ -125,7 +125,7 @@ describe Spam::SpamCheckService do
context
'when allow_possible_spam feature flag is true'
do
it_behaves_like
'akismet spam'
it
'does not
chec
k as spam'
do
it
'does not
mar
k as spam'
do
subject
expect
(
issue
.
spam
).
to
be_falsey
...
...
@@ -133,7 +133,7 @@ describe Spam::SpamCheckService do
end
end
context
'when not indicated as spam by
a
kismet'
do
context
'when not indicated as spam by
A
kismet'
do
before
do
allow
(
Spam
::
AkismetService
).
to
receive
(
:new
).
and_return
(
double
(
spam?:
false
))
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