Merge commit 'aa04efb92a47cf27c1aafb2aeb21584e91c526ac' into glitch-soc/merge-upstream

Conflicts:
- `app/models/user_settings.rb`:
  Not a real conflict, upstream added a setting on a line adjacent to a
  glitch-soc-only line.
  Added upstream's new setting.
This commit is contained in:
Claire
2025-05-14 13:38:23 +02:00
133 changed files with 957 additions and 272 deletions

View File

@@ -70,6 +70,25 @@ RSpec.describe Mastodon::CLI::Accounts do
end
end
context 'with min_age setting' do
let(:options) { { email: 'tootctl@example.com', confirmed: true } }
before do
Setting.min_age = 42
end
it_behaves_like 'a new user with given email address and username'
it 'creates a new user with confirmed status' do
expect { subject }
.to output_results('New password')
user = User.find_by(email: options[:email])
expect(user.confirmed?).to be(true)
end
end
context 'with --confirmed option' do
let(:options) { { email: 'tootctl@example.com', confirmed: true } }

View File

@@ -26,6 +26,8 @@ RSpec.describe 'Admin Rules' do
it 'creates new record with valid attributes' do
visit admin_rules_path
click_on I18n.t('admin.rules.add_new')
# Invalid submission
fill_in 'rule_text', with: ''
expect { submit_form }

View File

@@ -125,6 +125,7 @@ RSpec.describe ActivityPub::FetchAllRepliesWorker do
before do
stub_const('Status::FetchRepliesConcern::FETCH_REPLIES_ENABLED', true)
allow(FetchReplyWorker).to receive(:push_bulk)
allow(FetchReplyWorker).to receive(:perform_async)
all_items.each do |item|
next if [top_note_uri, reply_note_uri].include? item
@@ -146,6 +147,12 @@ RSpec.describe ActivityPub::FetchAllRepliesWorker do
got_uris = subject.perform(status.id)
expect(got_uris).to match_array(top_items + top_items_paged)
end
it 'fetches the top status only once' do
_ = subject.perform(status.id, { request_id: 0 })
expect(FetchReplyWorker).to have_received(:perform_async).with(top_note_uri, { prefetched_body: top_object.deep_stringify_keys, request_id: 0 })
expect(a_request(:get, top_note_uri)).to have_been_made.once
end
end
describe 'perform' do