Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire committed May 27, 2024
1 parent a96cf6f commit c3f5de4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/controllers/activitypub/replies_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,17 @@
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
Expand Down

0 comments on commit c3f5de4

Please sign in to comment.