mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 16:59:41 +00:00
Merge commit '877090518682b6c77ba9bdfa0231afd56daec44d' into glitch-soc/merge-upstream
Conflicts: - `app/models/concerns/user/has_settings.rb`: Not a real conflict, upstream added a setting textually close to a glitch-soc one. Added upstream's new setting. - `app/views/settings/preferences/appearance/show.html.haml`: Not a real conflict, upstream added a setting textually close to a glitch-soc one. Added upstream's new setting. - `config/routes.rb`: Upstream moved web app routes to `config/routes/web_app.rb`, while glitch-soc had an extra route. Moved the extra route to `config/routes/web_app.rb`. - `spec/controllers/settings/preferences/appearance_controller_spec.rb`: This spec got converted to a system spec upstream. However, the theme setting works differently in glitch-soc, so the spec had been changed. Changed the corresponding system spec as well.
This commit is contained in:
24
spec/requests/api/v1/instances/terms_of_services_spec.rb
Normal file
24
spec/requests/api/v1/instances/terms_of_services_spec.rb
Normal file
@@ -0,0 +1,24 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'Terms of Service' do
|
||||
describe 'GET /api/v1/instance/terms_of_service' do
|
||||
before do
|
||||
Fabricate(:terms_of_service)
|
||||
end
|
||||
|
||||
it 'returns http success' do
|
||||
get api_v1_instance_terms_of_service_path
|
||||
|
||||
expect(response)
|
||||
.to have_http_status(200)
|
||||
expect(response.content_type)
|
||||
.to start_with('application/json')
|
||||
|
||||
expect(response.parsed_body)
|
||||
.to be_present
|
||||
.and include(:content)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -55,6 +55,9 @@ RSpec.describe 'Instances' do
|
||||
max_characters: StatusLengthValidator::MAX_CHARS,
|
||||
max_media_attachments: Status::MEDIA_ATTACHMENTS_LIMIT
|
||||
),
|
||||
media_attachments: include(
|
||||
description_limit: MediaAttachment::MAX_DESCRIPTION_LENGTH
|
||||
),
|
||||
polls: include(
|
||||
max_options: PollValidator::MAX_OPTIONS
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user