The code powering m.abunchtell.com https://m.abunchtell.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

24 lines
604 B

  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_status?' 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_status?(status, follower) }
  14. it 'returns a boolean value' do
  15. expect(subject).to be false
  16. end
  17. end
  18. end