]> source.dussan.org Git - redmine.git/commitdiff
Test for r17763 (#30171).
authorGo MAEDA <maeda@farend.jp>
Mon, 17 Dec 2018 04:52:36 +0000 (04:52 +0000)
committerGo MAEDA <maeda@farend.jp>
Mon, 17 Dec 2018 04:52:36 +0000 (04:52 +0000)
Patch by Go MAEDA.

git-svn-id: http://svn.redmine.org/redmine/trunk@17764 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/lib/redmine/ciphering_test.rb

index 76b0e3743105e67f0c2da78175fddd15ce1f76e2..38f87b4197365433d32a786dd6c3cd16f3137126 100644 (file)
@@ -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