Add ltl mode support
This commit is contained in:
parent
7656687d43
commit
d1ae53e688
12 changed files with 188 additions and 27 deletions
|
@ -56,6 +56,10 @@ RSpec.describe FanOutOnWriteService, type: :service do
|
|||
antenna
|
||||
end
|
||||
|
||||
def antenna_with_options(owner, **options)
|
||||
Fabricate(:antenna, account: owner, **options)
|
||||
end
|
||||
|
||||
context 'when status is public' do
|
||||
let(:visibility) { 'public' }
|
||||
|
||||
|
@ -97,6 +101,26 @@ RSpec.describe FanOutOnWriteService, type: :service do
|
|||
expect(antenna_feed_of(empty_antenna)).to_not include status.id
|
||||
end
|
||||
end
|
||||
|
||||
context 'with STL antenna' do
|
||||
let!(:antenna) { antenna_with_options(bob, stl: true) }
|
||||
let!(:empty_antenna) { antenna_with_options(tom) }
|
||||
|
||||
it 'is added to the antenna feed of antenna follower' do
|
||||
expect(antenna_feed_of(antenna)).to include status.id
|
||||
expect(antenna_feed_of(empty_antenna)).to_not include status.id
|
||||
end
|
||||
end
|
||||
|
||||
context 'with LTL antenna' do
|
||||
let!(:antenna) { antenna_with_options(bob, ltl: true) }
|
||||
let!(:empty_antenna) { antenna_with_options(tom) }
|
||||
|
||||
it 'is added to the antenna feed of antenna follower' do
|
||||
expect(antenna_feed_of(antenna)).to include status.id
|
||||
expect(antenna_feed_of(empty_antenna)).to_not include status.id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when status is limited' do
|
||||
|
@ -176,6 +200,24 @@ RSpec.describe FanOutOnWriteService, type: :service do
|
|||
expect(antenna_feed_of(empty_antenna)).to_not include status.id
|
||||
end
|
||||
end
|
||||
|
||||
context 'with STL antenna' do
|
||||
let!(:antenna) { antenna_with_options(bob, stl: true) }
|
||||
let!(:empty_antenna) { antenna_with_options(ohagi, stl: true) }
|
||||
|
||||
it 'is added to the antenna feed of antenna follower' do
|
||||
expect(antenna_feed_of(antenna)).to include status.id
|
||||
expect(antenna_feed_of(empty_antenna)).to_not include status.id
|
||||
end
|
||||
end
|
||||
|
||||
context 'with LTL antenna' do
|
||||
let!(:empty_antenna) { antenna_with_options(bob, ltl: true) }
|
||||
|
||||
it 'is added to the antenna feed of antenna follower' do
|
||||
expect(antenna_feed_of(empty_antenna)).to_not include status.id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when status is unlisted' do
|
||||
|
@ -215,6 +257,24 @@ RSpec.describe FanOutOnWriteService, type: :service do
|
|||
end
|
||||
end
|
||||
|
||||
context 'with STL antenna' do
|
||||
let!(:antenna) { antenna_with_options(bob, stl: true) }
|
||||
let!(:empty_antenna) { antenna_with_options(ohagi, stl: true) }
|
||||
|
||||
it 'is added to the antenna feed of antenna follower' do
|
||||
expect(antenna_feed_of(antenna)).to include status.id
|
||||
expect(antenna_feed_of(empty_antenna)).to_not include status.id
|
||||
end
|
||||
end
|
||||
|
||||
context 'with LTL antenna' do
|
||||
let!(:empty_antenna) { antenna_with_options(bob, ltl: true) }
|
||||
|
||||
it 'is added to the antenna feed of antenna follower' do
|
||||
expect(antenna_feed_of(empty_antenna)).to_not include status.id
|
||||
end
|
||||
end
|
||||
|
||||
context 'with non-public searchability' do
|
||||
let(:searchability) { 'direct' }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue