Add: 検索許可「ローカルとフォロワー」 (#60)
This commit is contained in:
parent
deb8642e95
commit
235bef36d0
24 changed files with 210 additions and 25 deletions
|
@ -363,6 +363,15 @@ RSpec.describe FanOutOnWriteService, type: :service do
|
|||
expect(redis).to_not have_received(:publish).with('timeline:public', anything)
|
||||
end
|
||||
|
||||
context 'with searchability public_unlisted' do
|
||||
let(:searchability) { 'public_unlisted' }
|
||||
|
||||
it 'is not broadcast to the hashtag stream' do
|
||||
expect(redis).to have_received(:publish).with('timeline:hashtag:hoge', anything)
|
||||
expect(redis).to have_received(:publish).with('timeline:hashtag:hoge:local', anything)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with searchability private' do
|
||||
let(:searchability) { 'private' }
|
||||
|
||||
|
|
|
@ -127,6 +127,13 @@ RSpec.describe PostStatusService, type: :service do
|
|||
expect(status.searchability).to eq 'private'
|
||||
end
|
||||
|
||||
it 'creates a status with limited searchability for silenced users with public_unlisted searchability' do
|
||||
status = subject.call(Fabricate(:account, silenced: true), text: 'test', searchability: :public_unlisted, visibility: :public)
|
||||
|
||||
expect(status).to be_persisted
|
||||
expect(status.searchability).to eq 'private'
|
||||
end
|
||||
|
||||
it 'creates a status with the given searchability=public / visibility=unlisted' do
|
||||
status = create_status_with_options(searchability: :public, visibility: :unlisted)
|
||||
|
||||
|
@ -134,6 +141,13 @@ RSpec.describe PostStatusService, type: :service do
|
|||
expect(status.searchability).to eq 'public'
|
||||
end
|
||||
|
||||
it 'creates a status with the given searchability=public_unlisted / visibility=unlisted' do
|
||||
status = create_status_with_options(searchability: :public_unlisted, visibility: :unlisted)
|
||||
|
||||
expect(status).to be_persisted
|
||||
expect(status.searchability).to eq 'public_unlisted'
|
||||
end
|
||||
|
||||
it 'creates a status with the given searchability=public / visibility=private' do
|
||||
status = create_status_with_options(searchability: :public, visibility: :private)
|
||||
|
||||
|
@ -141,6 +155,13 @@ RSpec.describe PostStatusService, type: :service do
|
|||
expect(status.searchability).to eq 'private'
|
||||
end
|
||||
|
||||
it 'creates a status with the given searchability=public_unlisted / visibility=private' do
|
||||
status = create_status_with_options(searchability: :public_unlisted, visibility: :private)
|
||||
|
||||
expect(status).to be_persisted
|
||||
expect(status.searchability).to eq 'private'
|
||||
end
|
||||
|
||||
it 'creates a status for the given application' do
|
||||
application = Fabricate(:application)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue