summaryrefslogtreecommitdiff
path: root/spec/features/admin
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2016-05-03 12:42:55 +0100
committerSean McGivern <sean@gitlab.com>2016-05-16 09:21:24 +0100
commitbec350528cdc81e26476780f1ca3db8171b3ece8 (patch)
tree31e273cd2202ad4e2647d127d464dd1c31b52ded /spec/features/admin
parent78a67fc48dab434b43a080e5b15491963656661a (diff)
downloadgitlab-ce-bec350528cdc81e26476780f1ca3db8171b3ece8.tar.gz
When an admin changes a user's password for them, force the user to reset the password after logging in by expiring the new password immediately.
Diffstat (limited to 'spec/features/admin')
-rw-r--r--spec/features/admin/admin_users_spec.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/features/admin/admin_users_spec.rb b/spec/features/admin/admin_users_spec.rb
index 4570e409128..6dee0cd8d47 100644
--- a/spec/features/admin/admin_users_spec.rb
+++ b/spec/features/admin/admin_users_spec.rb
@@ -210,6 +210,8 @@ describe "Admin::Users", feature: true do
before do
fill_in "user_name", with: "Big Bang"
fill_in "user_email", with: "bigbang@mail.com"
+ fill_in "user_password", with: "AValidPassword1"
+ fill_in "user_password_confirmation", with: "AValidPassword1"
check "user_admin"
click_button "Save changes"
end
@@ -223,6 +225,7 @@ describe "Admin::Users", feature: true do
@simple_user.reload
expect(@simple_user.name).to eq('Big Bang')
expect(@simple_user.is_admin?).to be_truthy
+ expect(@simple_user.password_expires_at).to be <= Time.now
end
end
end