diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-22 12:08:39 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-22 12:08:39 +0300 |
commit | 001243986195143c395a9811d8254bbf1b9ebfa1 (patch) | |
tree | 6d6d665154fd38beea6ea7f8985330f956565bb3 /spec/models/user_spec.rb | |
parent | 83d8c1d61762898eb4e69878f117cbb2ef5be494 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/user_spec.rb')
-rw-r--r-- | spec/models/user_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 5620f211d9c..6f393d169a2 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -508,6 +508,20 @@ describe User, :do_not_mock_admin_mode do end end + describe '.random_password' do + let(:random_password) { described_class.random_password } + + before do + expect(User).to receive(:password_length).and_return(88..128) + end + + context 'length' do + it 'conforms to the current password length settings' do + expect(random_password.length).to eq(128) + end + end + end + describe '.password_length' do let(:password_length) { described_class.password_length } |