mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-21 06:08:12 +00:00
Merge commit 'd27eb181f6ab419d1745a1fe9b94094be17a618f' into glitch-soc/merge-upstream
Conflicts: - `spec/requests/api/v2/instance_spec.rb`: Conflict due to glitch-soc having a different default site name. Updated the tests as upstream did, keeping glitch-soc's default name.
This commit is contained in:
@@ -18,6 +18,7 @@ describe 'Instances' do
|
||||
expect(body_as_json)
|
||||
.to be_present
|
||||
.and include(title: 'Mastodon Glitch Edition')
|
||||
.and include_configuration_limits
|
||||
end
|
||||
end
|
||||
|
||||
@@ -31,7 +32,26 @@ describe 'Instances' do
|
||||
expect(body_as_json)
|
||||
.to be_present
|
||||
.and include(title: 'Mastodon Glitch Edition')
|
||||
.and include_configuration_limits
|
||||
end
|
||||
end
|
||||
|
||||
def include_configuration_limits
|
||||
include(
|
||||
configuration: include(
|
||||
accounts: include(
|
||||
max_featured_tags: FeaturedTag::LIMIT,
|
||||
max_pinned_statuses: StatusPinValidator::PIN_LIMIT
|
||||
),
|
||||
statuses: include(
|
||||
max_characters: StatusLengthValidator::MAX_CHARS,
|
||||
max_media_attachments: 4 # TODO, move to constant somewhere
|
||||
),
|
||||
polls: include(
|
||||
max_options: PollValidator::MAX_OPTIONS
|
||||
)
|
||||
)
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user