0
0
Fork 0

Refactored generation of unique tags, URIs and object URLs into own classes,

as well as formatting of content
This commit is contained in:
Eugen Rochko 2016-09-09 20:04:34 +02:00
parent 735b4cc62e
commit 3cc47beb6e
28 changed files with 316 additions and 180 deletions

View file

@ -0,0 +1,23 @@
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