Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Implement pending tests (mastodon#11415)
Browse files Browse the repository at this point in the history
  • Loading branch information
ysksn authored and Gargron committed Jul 27, 2019
1 parent 8a4674f commit d6ada2e
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
28 changes: 27 additions & 1 deletion spec/lib/spam_check_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'rails_helper'

RSpec.describe SpamCheck do
Expand Down Expand Up @@ -133,7 +135,31 @@ def status_with_html(text, options = {})
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
Expand Down
10 changes: 9 additions & 1 deletion spec/models/poll_vote_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# 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

0 comments on commit d6ada2e

Please sign in to comment.