Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-10-10 21:10:58 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-10-10 21:10:58 +0300
commitb6dd7408f576e59908e9a293b55b81e00e9d25af (patch)
tree1101d2ac170bfe355e531ffb38804e0fe15c04ee /spec/tasks/gitlab
parent8af017c1805fc23513f56dc5a759e1a06d8e0e07 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/tasks/gitlab')
-rw-r--r--spec/tasks/gitlab/password_rake_spec.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/tasks/gitlab/password_rake_spec.rb b/spec/tasks/gitlab/password_rake_spec.rb
index 21a6dc102e6..5107066c7fc 100644
--- a/spec/tasks/gitlab/password_rake_spec.rb
+++ b/spec/tasks/gitlab/password_rake_spec.rb
@@ -3,7 +3,7 @@
require 'rake_helper'
RSpec.describe 'gitlab:password rake tasks', :silence_stdout do
- let!(:user_1) { create(:user, username: 'foobar', password: User.random_password) }
+ let!(:user_1) { create(:user, username: 'foobar', password: User.random_password, password_automatically_set: true) }
let(:password) { User.random_password }
def stub_username(username)
@@ -26,8 +26,14 @@ RSpec.describe 'gitlab:password rake tasks', :silence_stdout do
describe ':reset' do
context 'when all inputs are correct' do
it 'updates the password properly' do
+ expect(user_1.password_automatically_set?).to eq(true)
+
run_rake_task('gitlab:password:reset', user_1.username)
- expect(user_1.reload.valid_password?(password)).to eq(true)
+
+ user_1.reload
+
+ expect(user_1.valid_password?(password)).to eq(true)
+ expect(user_1.password_automatically_set?).to eq(false)
end
end