Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mastodon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pierre Boudes
mastodon
Commits
d6ada2eb
Commit
d6ada2eb
authored
5 years ago
by
ysksn
Committed by
Eugen Rochko
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Implement pending tests (#11415)
parent
8a4674f2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
spec/lib/spam_check_spec.rb
+27
-1
27 additions, 1 deletion
spec/lib/spam_check_spec.rb
spec/models/poll_vote_spec.rb
+9
-1
9 additions, 1 deletion
spec/models/poll_vote_spec.rb
with
36 additions
and
2 deletions
spec/lib/spam_check_spec.rb
+
27
−
1
View file @
d6ada2eb
# frozen_string_literal: true
require
'rails_helper'
RSpec
.
describe
SpamCheck
do
...
...
@@ -133,7 +135,31 @@ RSpec.describe SpamCheck do
end
describe
'#remember!'
do
pending
let
(
:status
)
{
status_with_html
(
'@alice'
)
}
let
(
:spam_check
)
{
described_class
.
new
(
status
)
}
let
(
:redis_key
)
{
spam_check
.
send
(
:redis_key
)
}
it
'remembers'
do
expect
do
spam_check
.
remember!
end
.
to
change
{
Redis
.
current
.
exists
(
redis_key
)
}.
from
(
false
).
to
(
true
)
end
end
describe
'#reset!'
do
let
(
:status
)
{
status_with_html
(
'@alice'
)
}
let
(
:spam_check
)
{
described_class
.
new
(
status
)
}
let
(
:redis_key
)
{
spam_check
.
send
(
:redis_key
)
}
before
do
spam_check
.
remember!
end
it
'resets'
do
expect
do
spam_check
.
reset!
end
.
to
change
{
Redis
.
current
.
exists
(
redis_key
)
}.
from
(
true
).
to
(
false
)
end
end
describe
'#flag!'
do
...
...
This diff is collapsed.
Click to expand it.
spec/models/poll_vote_spec.rb
+
9
−
1
View file @
d6ada2eb
# frozen_string_literal: true
require
'rails_helper'
RSpec
.
describe
PollVote
,
type: :model
do
pending
"add some examples to (or delete)
#{
__FILE__
}
"
describe
'#object_type'
do
let
(
:poll_vote
)
{
Fabricate
.
build
(
:poll_vote
)
}
it
'returns :vote'
do
expect
(
poll_vote
.
object_type
).
to
eq
:vote
end
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment