app
bin
config
db
docs
lib
log
public
spec
controllers
fabricators
fixtures
helpers
javascript
lib
feed_manager_spec.rb
formatter_spec.rb
tag_manager_spec.rb
mailers
models
services
i18n_spec.rb
rails_helper.rb
spec_helper.rb
storybook
streaming
vendor
.babelrc
.codeclimate.yml
.dockerignore
.env.production.sample
.env.test
.env.vagrant
.eslintrc
.gitignore
.nvmrc
.rspec
.rubocop.yml
.ruby-version
.travis.yml
Capfile
Dockerfile
Gemfile
Gemfile.lock
LICENSE
Procfile
README.md
Rakefile
Vagrantfile
app.json
config.ru
docker-compose.yml
package.json
yarn.lock
24 lines
597 B
Ruby
24 lines
597 B
Ruby
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?' 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?(:home, status, follower) }
|
|
|
|
it 'returns a boolean value' do
|
|
expect(subject).to be false
|
|
end
|
|
end
|
|
end
|