mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-12-22 13:17:13 +00:00
Implement pending tests (#11415)
This commit is contained in:
parent
8a4674f2c3
commit
d6ada2eb30
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'rails_helper'
|
require 'rails_helper'
|
||||||
|
|
||||||
RSpec.describe SpamCheck do
|
RSpec.describe SpamCheck do
|
||||||
|
@ -133,7 +135,31 @@ RSpec.describe SpamCheck do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#remember!' do
|
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
|
end
|
||||||
|
|
||||||
describe '#flag!' do
|
describe '#flag!' do
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'rails_helper'
|
require 'rails_helper'
|
||||||
|
|
||||||
RSpec.describe PollVote, type: :model do
|
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
|
end
|
||||||
|
|
Loading…
Reference in a new issue