Merge commit '4896d2c4c6d3bd6b878c5a075b6611c65d4203b2' into glitch-soc/merge-upstream
Conflicts: - `app/views/settings/preferences/appearance/show.html.haml`: Upstream changed stuff too close to glitch-soc's theming system changes. Applied upstream's changes. - `streaming/index.js`: Upstream refactored a bunch of stuff where our code was different due to local-only posts. Applied upstream's changes while taking care of local-only posts.
This commit is contained in:
commit
48ec31bec8
136 files changed
+1041
-1409
No files matched your search
@@ -248,6 +248,29 @@ RSpec.describe '/api/v1/statuses' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with a quote of a reblog' do
|
||||
let(:quoted_status) { Fabricate(:status, quote_approval_policy: Status::QUOTE_APPROVAL_POLICY_FLAGS[:public] << 16) }
|
||||
let(:reblog) { Fabricate(:status, reblog: quoted_status) }
|
||||
let(:params) do
|
||||
{
|
||||
status: 'Hello world, this is a self-quote',
|
||||
quoted_status_id: reblog.id,
|
||||
}
|
||||
end
|
||||
|
||||
it 'returns a quote post, as well as rate limit headers', :aggregate_failures do
|
||||
subject
|
||||
|
||||
expect(response).to have_http_status(200)
|
||||
expect(response.content_type)
|
||||
.to start_with('application/json')
|
||||
expect(response.parsed_body[:quote]).to be_present
|
||||
expect(response.parsed_body[:quote][:quoted_status][:id]).to eq quoted_status.id.to_s
|
||||
expect(response.headers['X-RateLimit-Limit']).to eq RateLimiter::FAMILIES[:statuses][:limit].to_s
|
||||
expect(response.headers['X-RateLimit-Remaining']).to eq (RateLimiter::FAMILIES[:statuses][:limit] - 1).to_s
|
||||
end
|
||||
end
|
||||
|
||||
context 'with a self-quote post and a CW but no text' do
|
||||
let(:quoted_status) { Fabricate(:status, account: user.account) }
|
||||
let(:params) do
|
||||
|
||||
Reference in new issue
Block a user