Browse Source

update tests for not show self-reply

closed-social-glitch-2
欧醚 1 year ago
parent
commit
0cad5169a3
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      spec/controllers/accounts_controller_spec.rb
  2. +2
    -2
      spec/controllers/api/v1/accounts/statuses_controller_spec.rb

+ 1
- 1
spec/controllers/accounts_controller_spec.rb View File

@ -322,7 +322,7 @@ RSpec.describe AccountsController, type: :controller do
end
it 'renders self-reply' do
expect(response.body).to include(ActivityPub::TagManager.instance.url_for(status_self_reply))
expect(response.body).not_to include(ActivityPub::TagManager.instance.url_for(status_self_reply))
end
it 'renders status with media' do

+ 2
- 2
spec/controllers/api/v1/accounts/statuses_controller_spec.rb View File

@ -48,11 +48,11 @@ describe Api::V1::Accounts::StatusesController do
expect(response).to have_http_status(200)
end
it 'returns posts along with self replies' do
it 'returns posts without self replies' do
json = body_as_json
post_ids = json.map { |item| item[:id].to_i }.sort
expect(post_ids).to eq [status.id, status_self_reply.id]
expect(post_ids).to eq [status.id]
end
end

Loading…
Cancel
Save