Add unlisted-public tag/circle/list tests

This commit is contained in:
KMY 2023-09-14 18:39:13 +09:00
parent 1e62ee4965
commit 258a29ffde
7 changed files with 360 additions and 3 deletions

View file

@ -66,5 +66,47 @@ describe TagFeed, type: :service do
results = described_class.new(tag_cats, nil).get(20)
expect(results).to include(status)
end
it 'public_unlisted post returns' do
status_tagged_with_cats.update(visibility: :public_unlisted)
results = described_class.new(tag_cats, nil).get(20)
expect(results).to include status_tagged_with_cats
end
it 'unlisted post not returns' do
status_tagged_with_cats.update(visibility: :unlisted)
results = described_class.new(tag_cats, nil).get(20)
expect(results).to_not include status_tagged_with_cats
end
it 'unlisted post not returns with account' do
status_tagged_with_cats.update(visibility: :unlisted)
results = described_class.new(tag_cats, account).get(20)
expect(results).to_not include status_tagged_with_cats
end
it 'unlisted/public_searchability post returns' do
status_tagged_with_cats.update(visibility: :unlisted, searchability: :public)
results = described_class.new(tag_cats, nil).get(20)
expect(results).to include status_tagged_with_cats
end
it 'unlisted/public_searchability post returns with account' do
status_tagged_with_cats.update(visibility: :unlisted, searchability: :public)
results = described_class.new(tag_cats, account).get(20)
expect(results).to include status_tagged_with_cats
end
it 'private post not returns' do
status_tagged_with_cats.update(visibility: :private, searchability: :public)
results = described_class.new(tag_cats, nil).get(20)
expect(results).to_not include status_tagged_with_cats
end
it 'private post not returns with account' do
status_tagged_with_cats.update(visibility: :private, searchability: :public)
results = described_class.new(tag_cats, account).get(20)
expect(results).to_not include status_tagged_with_cats
end
end
end