1
0
mirror of https://github.com/mastodon/mastodon synced 2024-12-22 10:38:14 +09:00
mastodon/spec/lib/feed_manager_spec.rb

24 lines
597 B
Ruby
Raw Normal View History

require 'rails_helper'
RSpec.describe FeedManager do
describe '#key' do
subject { FeedManager.instance.key(:home, 1) }
it 'returns a string' do
expect(subject).to be_a String
end
end
2016-10-02 22:28:47 +09:00
describe '#filter?' do
let(:followee) { Fabricate(:account, username: 'alice') }
let(:status) { Fabricate(:status, text: 'Hello world', account: followee) }
let(:follower) { Fabricate(:account, username: 'bob') }
2016-10-02 22:28:47 +09:00
subject { FeedManager.instance.filter?(:home, status, follower) }
it 'returns a boolean value' do
expect(subject).to be false
end
end
end