summaryrefslogtreecommitdiffstats
path: root/test/unit/user_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-11-27 21:52:38 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-11-27 21:52:38 +0000
commite43448f6cae297b8364c0d0520daf8f0041649c7 (patch)
treee0cbb1053479b9d32c18025ff4b0b684f333d6e3 /test/unit/user_test.rb
parent14e56006a1f83ceb70291234d7b609150446aefb (diff)
downloadredmine-e43448f6cae297b8364c0d0520daf8f0041649c7.tar.gz
redmine-e43448f6cae297b8364c0d0520daf8f0041649c7.zip
Use 8+ characters long passwords in tests.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10886 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/user_test.rb')
-rw-r--r--test/unit/user_test.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb
index eff9a61ff..e3260b797 100644
--- a/test/unit/user_test.rb
+++ b/test/unit/user_test.rb
@@ -77,7 +77,7 @@ class UserTest < ActiveSupport::TestCase
assert_equal 1, user.errors.count
user.login = "newuser"
- user.password, user.password_confirmation = "passwd", "password"
+ user.password, user.password_confirmation = "password", "pass"
# password confirmation
assert !user.save
assert_equal 1, user.errors.count
@@ -375,12 +375,12 @@ class UserTest < ActiveSupport::TestCase
should "select the exact matching user first" do
case_sensitive_user = User.generate! do |user|
- user.password = "admin"
+ user.password = "admin123"
end
# bypass validations to make it appear like existing data
case_sensitive_user.update_attribute(:login, 'ADMIN')
- user = User.try_to_login("ADMIN", "admin")
+ user = User.try_to_login("ADMIN", "admin123")
assert_kind_of User, user
assert_equal "ADMIN", user.login
@@ -391,10 +391,10 @@ class UserTest < ActiveSupport::TestCase
user = User.try_to_login("admin", "admin")
assert_kind_of User, user
assert_equal "admin", user.login
- user.password = "hello"
+ user.password = "hello123"
assert user.save
- user = User.try_to_login("admin", "hello")
+ user = User.try_to_login("admin", "hello123")
assert_kind_of User, user
assert_equal "admin", user.login
end
@@ -695,7 +695,7 @@ class UserTest < ActiveSupport::TestCase
def test_default_admin_account_changed_should_return_false_if_account_was_not_changed
user = User.find_by_login("admin")
user.password = "admin"
- user.save!
+ assert user.save(:validate => false)
assert_equal false, User.default_admin_account_changed?
end
@@ -712,7 +712,7 @@ class UserTest < ActiveSupport::TestCase
user = User.find_by_login("admin")
user.password = "admin"
user.status = User::STATUS_LOCKED
- user.save!
+ assert user.save(:validate => false)
assert_equal true, User.default_admin_account_changed?
end