Merge commit '0b4a3a04378ce43f2f314b9446b5053f6b374c6d' into glitch-soc/merge-upstream

Conflicts:
- `Gemfile.lock`:
  Conflict caused by the `json` gem thing once again.
  Updated as upstream did, but keeping the most recent `json` version.
- `spec/helpers/application_helper_spec.rb`:
  Upstream refactored a bunch of specs, including one place that differs
  because of glitch-soc's theming system.
  Refactored as upstream did, adapting it for glitch-soc's theming system.
This commit is contained in:
Claire
2023-12-20 22:16:50 +01:00
125 changed files with 1272 additions and 497 deletions

View File

@@ -29,15 +29,27 @@ describe ApplicationHelper do
describe 'body_classes' do
context 'with a body class string from a controller' do
before do
without_partial_double_verification do
allow(helper).to receive_messages(body_class_string: 'modal-layout compose-standalone', current_flavour: 'glitch', current_skin: 'default', current_account: Fabricate(:account))
end
end
before { helper.extend controller_helpers }
it 'uses the controller body classes in the result' do
expect(helper.body_classes).to match(/modal-layout compose-standalone/)
end
private
def controller_helpers
Module.new do
def body_class_string = 'modal-layout compose-standalone'
def body_class_string = 'modal-layout compose-standalone'
def current_account
@current_account ||= Fabricate(:account)
end
def current_flavour = 'glitch'
def current_skin = 'default'
end
end
end
end
@@ -122,9 +134,7 @@ describe ApplicationHelper do
describe 'available_sign_up_path' do
context 'when registrations are closed' do
before do
without_partial_double_verification do
allow(Setting).to receive(:registrations_mode).and_return('none')
end
allow(Setting).to receive(:[]).with('registrations_mode').and_return 'none'
end
it 'redirects to joinmastodon site' do