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
24 lines
604 B
8 years ago
|
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
|
||
|
|
||
|
describe '#filter_status?' do
|
||
|
let(:followee) { Fabricate(:account, username: 'alice') }
|
||
|
let(:status) { Fabricate(:status, text: 'Hello world', account: followee) }
|
||
|
let(:follower) { Fabricate(:account, username: 'bob') }
|
||
|
|
||
|
subject { FeedManager.instance.filter_status?(status, follower) }
|
||
|
|
||
|
it 'returns a boolean value' do
|
||
|
expect(subject).to be false
|
||
|
end
|
||
|
end
|
||
|
end
|