mirror of
https://github.com/mastodon/mastodon.git
synced 2025-01-21 21:25:19 +01:00
Add tests
This commit is contained in:
parent
eea1cfe1a9
commit
eee4eee7f0
1 changed files with 11 additions and 0 deletions
|
@ -130,6 +130,17 @@ RSpec.describe ActivityPub::RepliesController do
|
||||||
context 'with only_other_accounts' do
|
context 'with only_other_accounts' do
|
||||||
let(:only_other_accounts) { 'true' }
|
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
|
it 'returns items with other public or unlisted replies' do
|
||||||
expect(response.parsed_body)
|
expect(response.parsed_body)
|
||||||
.to include(
|
.to include(
|
||||||
|
|
Loading…
Add table
Reference in a new issue