Merge remote-tracking branch 'parent/main' into upstream-20241113
This commit is contained in:
commit
910eafda63
177 changed files with 1625 additions and 659 deletions
|
@ -13,7 +13,7 @@ RSpec.describe Admin::SystemCheck::DatabaseSchemaCheck do
|
|||
context 'when database needs migration' do
|
||||
before do
|
||||
context = instance_double(ActiveRecord::MigrationContext, needs_migration?: true)
|
||||
allow(ActiveRecord::Base.connection).to receive(:migration_context).and_return(context)
|
||||
allow(ActiveRecord::Base.connection_pool).to receive(:migration_context).and_return(context)
|
||||
end
|
||||
|
||||
it 'returns false' do
|
||||
|
@ -24,7 +24,7 @@ RSpec.describe Admin::SystemCheck::DatabaseSchemaCheck do
|
|||
context 'when database does not need migration' do
|
||||
before do
|
||||
context = instance_double(ActiveRecord::MigrationContext, needs_migration?: false)
|
||||
allow(ActiveRecord::Base.connection).to receive(:migration_context).and_return(context)
|
||||
allow(ActiveRecord::Base.connection_pool).to receive(:migration_context).and_return(context)
|
||||
end
|
||||
|
||||
it 'returns true' do
|
||||
|
|
|
@ -27,9 +27,10 @@ RSpec.describe Admin::SystemCheck::SoftwareVersionCheck do
|
|||
|
||||
context 'when checks are disabled' do
|
||||
around do |example|
|
||||
ClimateControl.modify UPDATE_CHECK_URL: '' do
|
||||
example.run
|
||||
end
|
||||
original = Rails.configuration.x.mastodon.software_update_url
|
||||
Rails.configuration.x.mastodon.software_update_url = ''
|
||||
example.run
|
||||
Rails.configuration.x.mastodon.software_update_url = original
|
||||
end
|
||||
|
||||
it 'returns true' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue