Merge commit '40ba6e119b7457161fd43b449875d0fb9d473c1a' into glitch-soc/merge-upstream

Conflicts:
- `app/controllers/concerns/web_app_controller_concern.rb`:
  Upstream changed the order of Action Controller filters for web app
  controllers.
  Glitch-soc has an extra filter due to its theming system.
  Changed the order accordingly.
- `app/views/settings/preferences/appearance/show.html.haml`:
  Conflict due to an extra newline in glitch-soc.
  Removed that newline and applied upstream's changes.
This commit is contained in:
Claire
2023-10-08 17:26:43 +02:00
15 changed files with 576 additions and 493 deletions
+26
View File
@@ -60,4 +60,30 @@ describe LanguagesHelper do
end
end
end
describe 'sorted_locales' do
context 'when sorting with native name' do
it 'returns Suomi after Gàidhlig' do
expect(described_class.sorted_locale_keys(%w(fi gd))).to eq(%w(gd fi))
end
end
context 'when sorting with diacritics' do
it 'returns Íslensk before Suomi' do
expect(described_class.sorted_locale_keys(%w(fi is))).to eq(%w(is fi))
end
end
context 'when sorting with non-Latin' do
it 'returns Suomi before Amharic' do
expect(described_class.sorted_locale_keys(%w(am fi))).to eq(%w(fi am))
end
end
context 'when sorting with local variants' do
it 'returns variant in-line' do
expect(described_class.sorted_locale_keys(%w(en eo en-GB))).to eq(%w(en en-GB eo))
end
end
end
end
+8
View File
@@ -28,6 +28,14 @@ describe CacheBuster do
end
context 'when using default options' do
around do |example|
# Disables the CacheBuster.new deprecation warning about default arguments.
# Remove this `silence` block when default arg support is removed from CacheBuster
ActiveSupport::Deprecation.silence do
example.run
end
end
include_examples 'makes_request'
end
+1
View File
@@ -30,6 +30,7 @@ module TestEndpoints
/directory
/@alice
/@alice/110224538612341312
/deck/home
).freeze
# Endpoints that should be cachable when accessed anonymously but have a Vary