Mercurial > hg > soundsoftware-site
diff test/unit/lib/redmine/ciphering_test.rb @ 1517:dffacf8a6908 redmine-2.5
Update to Redmine SVN revision 13367 on 2.5-stable branch
author | Chris Cannam |
---|---|
date | Tue, 09 Sep 2014 09:29:00 +0100 |
parents | e248c7af89ec |
children |
line wrap: on
line diff
--- a/test/unit/lib/redmine/ciphering_test.rb Tue Sep 09 09:28:31 2014 +0100 +++ b/test/unit/lib/redmine/ciphering_test.rb Tue Sep 09 09:29:00 2014 +0100 @@ -57,7 +57,7 @@ end Redmine::Configuration.with 'database_cipher_key' => 'secret' do - r = Repository.first(:order => 'id DESC') + r = Repository.order('id DESC').first assert_equal 'clear', r.password end end @@ -68,7 +68,7 @@ end Redmine::Configuration.with 'database_cipher_key' => '' do - r = Repository.first(:order => 'id DESC') + r = Repository.order('id DESC').first # password can not be deciphered assert_nothing_raised do assert r.password.match(/\Aaes-256-cbc:.+\Z/) @@ -85,7 +85,7 @@ Redmine::Configuration.with 'database_cipher_key' => 'secret' do assert Repository.encrypt_all(:password) - r = Repository.first(:order => 'id DESC') + r = Repository.order('id DESC').first assert_equal 'bar', r.password assert r.read_attribute(:password).match(/\Aaes-256-cbc:.+\Z/) end @@ -98,7 +98,7 @@ Repository::Subversion.create!(:password => 'bar', :url => 'file:///tmp', :identifier => 'bar') assert Repository.decrypt_all(:password) - r = Repository.first(:order => 'id DESC') + r = Repository.order('id DESC').first assert_equal 'bar', r.password assert_equal 'bar', r.read_attribute(:password) end