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

This commit is contained in:
Claire authored and GitHub committed 2025-05-12 09:28:12 +00:00
1 parent 3357ae9889
commit 4e2aa78a56
4 files changed
+33 -7

No files matched your search

+19
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 } }