* Bump version to 8.0 * Add: 他のサーバーに公開する情報に、制限設定などを追加 * Fix: `quote_of_id`のインデックス * Fix: #172 他のサーバーからの相乗り絵文字削除が反映されない * Test: #166 リモートから自分の絵文字を受け取った時、ライセンスが上書きされないことを確認するテスト * Add: #62 ローカルタイムラインを無効にする管理者設定(内部挙動のみ) * Add: 画面部分を追加
This commit is contained in:
parent
ae865975d4
commit
1d8862712a
21 changed files with 238 additions and 16 deletions
|
@ -5,6 +5,8 @@ require 'rails_helper'
|
|||
RSpec.describe DeliveryAntennaService, type: :service do
|
||||
subject { described_class.new }
|
||||
|
||||
let(:ltl_enabled) { true }
|
||||
|
||||
let(:last_active_at) { Time.now.utc }
|
||||
let(:last_active_at_tom) { Time.now.utc }
|
||||
let(:visibility) { :public }
|
||||
|
@ -36,6 +38,8 @@ RSpec.describe DeliveryAntennaService, type: :service do
|
|||
bob.follow!(alice)
|
||||
alice.block!(ohagi)
|
||||
|
||||
Form::AdminSettings.new(enable_local_timeline: '0').save unless ltl_enabled
|
||||
|
||||
allow(redis).to receive(:publish)
|
||||
|
||||
subject.call(status, false, mode: mode)
|
||||
|
@ -124,6 +128,29 @@ RSpec.describe DeliveryAntennaService, type: :service do
|
|||
end
|
||||
end
|
||||
|
||||
context 'with local domain' do
|
||||
let(:domain) { nil }
|
||||
let!(:antenna) { antenna_with_domain(bob, 'cb6e6126.ngrok.io') }
|
||||
let!(:empty_antenna) { antenna_with_domain(tom, 'ohagi.example.com') }
|
||||
|
||||
it 'detecting antenna' do
|
||||
expect(antenna_feed_of(antenna)).to include status.id
|
||||
end
|
||||
|
||||
it 'not detecting antenna' do
|
||||
expect(antenna_feed_of(empty_antenna)).to_not include status.id
|
||||
end
|
||||
|
||||
context 'when local timeline is disabled' do
|
||||
let(:ltl_enabled) { false }
|
||||
|
||||
it 'not detecting antenna' do
|
||||
expect(antenna_feed_of(antenna)).to_not include status.id
|
||||
expect(antenna_feed_of(empty_antenna)).to_not include status.id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'with tag' do
|
||||
let!(:antenna) { antenna_with_tag(bob, 'hoge') }
|
||||
let!(:empty_antenna) { antenna_with_tag(tom, 'hog') }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue