diff options
author | Go MAEDA <maeda@farend.jp> | 2018-12-17 04:52:36 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-12-17 04:52:36 +0000 |
commit | 1ffdaafb3be850563085faf74ae9fa164ac238e7 (patch) | |
tree | ebd92366f515a72ef3c0c8394ec2823698867726 /test | |
parent | 4f96d8f832d5db64ccb61d97e7f1e3a2e0fd4eb9 (diff) | |
download | redmine-1ffdaafb3be850563085faf74ae9fa164ac238e7.tar.gz redmine-1ffdaafb3be850563085faf74ae9fa164ac238e7.zip |
Test for r17763 (#30171).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@17764 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/lib/redmine/ciphering_test.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/unit/lib/redmine/ciphering_test.rb b/test/unit/lib/redmine/ciphering_test.rb index 76b0e3743..38f87b419 100644 --- a/test/unit/lib/redmine/ciphering_test.rb +++ b/test/unit/lib/redmine/ciphering_test.rb @@ -21,8 +21,9 @@ class Redmine::CipheringTest < ActiveSupport::TestCase def test_password_should_be_encrypted Redmine::Configuration.with 'database_cipher_key' => 'secret' do - r = Repository::Subversion.create!(:password => 'foo', :url => 'file:///tmp', :identifier => 'svn') - assert_equal 'foo', r.password + plaintext_password = "THIS_IS_A_32_BYTES_LONG_PASSWORD" + r = Repository::Subversion.create!(:password => plaintext_password, :url => 'file:///tmp', :identifier => 'svn') + assert_equal plaintext_password, r.password assert r.read_attribute(:password).match(/\Aaes-256-cbc:.+\Z/) end end |