* #609 ローカルユーザー設定から購読許可を削除 * Fix test * Fix test
This commit is contained in:
parent
ec60b68608
commit
0c37295624
16 changed files with 34 additions and 146 deletions
|
@ -129,29 +129,41 @@ RSpec.describe FanOutOnWriteService do
|
|||
expect(antenna_feed_of(empty_antenna)).to_not include status.id
|
||||
end
|
||||
|
||||
context 'when subscription is blocked' do
|
||||
let(:subscription_policy) { :block }
|
||||
context 'with subscription policy' do
|
||||
context 'when subscription is blocked' do
|
||||
let(:subscription_policy) { :block }
|
||||
let(:alice) { Fabricate(:account, domain: 'example.com', uri: 'https://example.com/alice', subscription_policy: subscription_policy) }
|
||||
|
||||
it 'is not added to the antenna feed', :inline_jobs do
|
||||
expect(antenna_feed_of(antenna)).to_not include status.id
|
||||
end
|
||||
end
|
||||
|
||||
context 'when subscription is allowed followers only' do
|
||||
let(:subscription_policy) { :followers_only }
|
||||
let!(:antenna) { antenna_with_account(ohagi, alice) }
|
||||
|
||||
it 'is not added to the antenna feed', :inline_jobs do
|
||||
expect(antenna_feed_of(antenna)).to_not include status.id
|
||||
it 'is not added to the antenna feed', :inline_jobs do
|
||||
expect(antenna_feed_of(antenna)).to_not include status.id
|
||||
end
|
||||
end
|
||||
|
||||
context 'with following' do
|
||||
let!(:antenna) { antenna_with_account(bob, alice) }
|
||||
context 'when local user subscription policy is disabled' do
|
||||
let(:subscription_policy) { :block }
|
||||
|
||||
it 'is added to the antenna feed', :inline_jobs do
|
||||
expect(antenna_feed_of(antenna)).to include status.id
|
||||
end
|
||||
end
|
||||
|
||||
context 'when subscription is allowed followers only' do
|
||||
let(:subscription_policy) { :followers_only }
|
||||
let!(:antenna) { antenna_with_account(ohagi, alice) }
|
||||
let(:alice) { Fabricate(:account, domain: 'example.com', uri: 'https://example.com/alice', subscription_policy: subscription_policy) }
|
||||
|
||||
it 'is not added to the antenna feed', :inline_jobs do
|
||||
expect(antenna_feed_of(antenna)).to_not include status.id
|
||||
end
|
||||
|
||||
context 'with following' do
|
||||
let!(:antenna) { antenna_with_account(bob, alice) }
|
||||
|
||||
it 'is added to the antenna feed', :inline_jobs do
|
||||
expect(antenna_feed_of(antenna)).to include status.id
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when dtl post' do
|
||||
|
@ -168,29 +180,6 @@ RSpec.describe FanOutOnWriteService do
|
|||
expect(antenna_feed_of(antenna)).to include status.id
|
||||
end
|
||||
end
|
||||
|
||||
context 'with listening tag but sender is limiting subscription' do
|
||||
let(:subscription_policy) { :block }
|
||||
|
||||
it 'does not add to the antenna feed', :inline_jobs do
|
||||
expect(antenna_feed_of(antenna)).to_not include status.id
|
||||
end
|
||||
end
|
||||
|
||||
context 'with listening tag but sender is limiting subscription but permit dtl only' do
|
||||
let(:subscription_policy) { :block }
|
||||
let(:custom_before) { true }
|
||||
|
||||
before do
|
||||
alice.user.settings['dtl_force_subscribable'] = true
|
||||
alice.user.save!
|
||||
subject.call(status)
|
||||
end
|
||||
|
||||
it 'is added to the antenna feed', :inline_jobs do
|
||||
expect(antenna_feed_of(antenna)).to include status.id
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -203,14 +192,6 @@ RSpec.describe FanOutOnWriteService do
|
|||
expect(antenna_feed_of(empty_antenna)).to_not include status.id
|
||||
end
|
||||
|
||||
context 'when subscription is blocked' do
|
||||
let(:subscription_policy) { :block }
|
||||
|
||||
it 'is added to the antenna feed', :inline_jobs do
|
||||
expect(antenna_feed_of(antenna)).to include status.id
|
||||
end
|
||||
end
|
||||
|
||||
context 'when local timeline is disabled' do
|
||||
let(:ltl_enabled) { false }
|
||||
|
||||
|
@ -230,14 +211,6 @@ RSpec.describe FanOutOnWriteService do
|
|||
expect(antenna_feed_of(empty_antenna)).to_not include status.id
|
||||
end
|
||||
|
||||
context 'when subscription is blocked' do
|
||||
let(:subscription_policy) { :block }
|
||||
|
||||
it 'is added to the antenna feed', :inline_jobs do
|
||||
expect(antenna_feed_of(antenna)).to include status.id
|
||||
end
|
||||
end
|
||||
|
||||
context 'when local timeline is disabled' do
|
||||
let(:ltl_enabled) { false }
|
||||
|
||||
|
@ -438,14 +411,6 @@ RSpec.describe FanOutOnWriteService do
|
|||
expect(antenna_feed_of(antenna)).to include status.id
|
||||
expect(antenna_feed_of(empty_antenna)).to_not include status.id
|
||||
end
|
||||
|
||||
context 'when subscription is blocked' do
|
||||
let(:subscription_policy) { :block }
|
||||
|
||||
it 'is not added to the antenna feed', :inline_jobs do
|
||||
expect(antenna_feed_of(antenna)).to_not include status.id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'with STL antenna' do
|
||||
|
@ -457,14 +422,6 @@ RSpec.describe FanOutOnWriteService do
|
|||
expect(antenna_feed_of(empty_antenna)).to_not include status.id
|
||||
end
|
||||
|
||||
context 'when subscription is blocked' do
|
||||
let(:subscription_policy) { :block }
|
||||
|
||||
it 'is added to the antenna feed', :inline_jobs do
|
||||
expect(antenna_feed_of(antenna)).to include status.id
|
||||
end
|
||||
end
|
||||
|
||||
context 'when local timeline is disabled' do
|
||||
let(:ltl_enabled) { false }
|
||||
|
||||
|
@ -484,14 +441,6 @@ RSpec.describe FanOutOnWriteService do
|
|||
expect(antenna_feed_of(empty_antenna)).to_not include status.id
|
||||
end
|
||||
|
||||
context 'when subscription is blocked' do
|
||||
let(:subscription_policy) { :block }
|
||||
|
||||
it 'is added to the antenna feed', :inline_jobs do
|
||||
expect(antenna_feed_of(antenna)).to include status.id
|
||||
end
|
||||
end
|
||||
|
||||
context 'when local timeline is disabled' do
|
||||
let(:ltl_enabled) { false }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue