0
0
Fork 0

Add more ActivityPub controller tests (#13590)

This commit is contained in:
Eugen Rochko 2020-05-03 22:19:24 +02:00 committed by GitHub
parent c0b849bdfd
commit 5cff7910c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 574 additions and 74 deletions

View file

@ -40,7 +40,7 @@ class AccountsController < ApplicationController
format.rss do
expires_in 1.minute, public: true
@statuses = filtered_statuses.without_reblogs.without_replies.limit(PAGE_SIZE)
@statuses = filtered_statuses.without_reblogs.limit(PAGE_SIZE)
@statuses = cache_collection(@statuses, Status)
render xml: RSS::AccountSerializer.render(@account, @statuses, params[:tag])
end
@ -129,11 +129,11 @@ class AccountsController < ApplicationController
end
def media_requested?
request.path.ends_with?('/media') && !tag_requested?
request.path.split('.').first.ends_with?('/media') && !tag_requested?
end
def replies_requested?
request.path.ends_with?('/with_replies') && !tag_requested?
request.path.split('.').first.ends_with?('/with_replies') && !tag_requested?
end
def tag_requested?