1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Add tests

This commit is contained in:
Claire 2022-05-21 11:28:30 +02:00
parent a96cf6f7de
commit c3f5de4269

View file

@ -116,6 +116,17 @@ RSpec.describe ActivityPub::RepliesController do
context 'with only_other_accounts' do
let(:only_other_accounts) { 'true' }
context 'when blocking some of the repliers' do
before do
status.account.block!(reply1.account)
status.account.block!(reply6.account)
end
it "does not list the blocked user's replies" do
expect(page_json[:items].map { |item| item.is_a?(String) ? item : item[:id] }).to match_array([ActivityPub::TagManager.instance.uri_for(reply2)])
end
end
it 'returns items with other public or unlisted replies' do
expect(page_json).to be_a Hash
expect(page_json[:items]).to be_an Array