Refactored generation of unique tags, URIs and object URLs into own classes,
as well as formatting of content
This commit is contained in:
parent
735b4cc62e
commit
3cc47beb6e
28 changed files with 316 additions and 180 deletions
23
spec/lib/feed_manager_spec.rb
Normal file
23
spec/lib/feed_manager_spec.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue