1
0

feed_manager_spec.rb 597 B

1234567891011121314151617181920212223
  1. require 'rails_helper'
  2. RSpec.describe FeedManager do
  3. describe '#key' do
  4. subject { FeedManager.instance.key(:home, 1) }
  5. it 'returns a string' do
  6. expect(subject).to be_a String
  7. end
  8. end
  9. describe '#filter?' do
  10. let(:followee) { Fabricate(:account, username: 'alice') }
  11. let(:status) { Fabricate(:status, text: 'Hello world', account: followee) }
  12. let(:follower) { Fabricate(:account, username: 'bob') }
  13. subject { FeedManager.instance.filter?(:home, status, follower) }
  14. it 'returns a boolean value' do
  15. expect(subject).to be false
  16. end
  17. end
  18. end