diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-13 21:06:27 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-13 21:06:27 +0300 |
commit | 6838304a85cd3b5dfdac076c600cb15f5643c674 (patch) | |
tree | 61785561cb8fde46b41630b0a6ad60ca8eb24b02 /spec | |
parent | 00882b3c33cb377b903cdf8e2b91149081739785 (diff) | |
download | gitlab-ce-6838304a85cd3b5dfdac076c600cb15f5643c674.tar.gz |
Force user password change for users created by admin
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/admin/admin_users_spec.rb | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/spec/features/admin/admin_users_spec.rb b/spec/features/admin/admin_users_spec.rb index bec43e5029c..15de101a17a 100644 --- a/spec/features/admin/admin_users_spec.rb +++ b/spec/features/admin/admin_users_spec.rb @@ -20,13 +20,10 @@ describe "Admin::Users" do describe "GET /admin/users/new" do before do - @password = "123ABC" visit new_admin_user_path fill_in "user_name", with: "Big Bang" fill_in "user_username", with: "bang" fill_in "user_email", with: "bigbang@mail.com" - fill_in "user_password", with: @password - fill_in "user_password_confirmation", with: @password end it "should create new user" do @@ -57,26 +54,13 @@ describe "Admin::Users" do end it "should send valid email to user with email & password" do - Gitlab.config.gitlab.stub(:signup_enabled).and_return(false) User.observers.enable :user_observer do click_button "Create user" user = User.last email = ActionMailer::Base.deliveries.last email.subject.should have_content("Account was created") email.text_part.body.should have_content(user.email) - email.text_part.body.should have_content(@password) - end - end - - it "should send valid email to user with email without password when signup is enabled" do - Gitlab.config.gitlab.stub(:signup_enabled).and_return(true) - User.observers.enable :user_observer do - click_button "Create user" - user = User.last - email = ActionMailer::Base.deliveries.last - email.subject.should have_content("Account was created") - email.text_part.body.should have_content(user.email) - email.text_part.body.should_not have_content(@password) + email.text_part.body.should have_content('password') end end end |