Fix tootctl accounts create failing because of date-of-birth check (#34663)
		
	This commit is contained in:
		
					parent
					
						
							
								3357ae9889
							
						
					
				
			
			
				commit
				
					
						4e2aa78a56
					
				
			
		
					 4 changed files with 33 additions and 7 deletions
				
			
		|  | @ -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 } } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue