Fix tootctl accounts create failing because of date-of-birth check (#34663)

This commit is contained in:
Claire 2025-05-12 11:28:12 +02:00 committed by GitHub
parent 3357ae9889
commit 4e2aa78a56
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 33 additions and 7 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 } }