[DRE-commits] [ruby-mail-gpg] 01/01: - test/message_test.rb: Fix expected exceptions if using no or a bad passphrase

Georg Faerber georg-alioth-guest at moszumanska.debian.org
Thu May 12 18:10:25 UTC 2016


This is an automated email from the git hooks/post-receive script.

georg-alioth-guest pushed a commit to branch tmp/tests
in repository ruby-mail-gpg.

commit a48d346ab578c7ff3911ba5f4fe02920216f2378
Author: Georg Faerber <georg at riseup.net>
Date:   Thu May 12 20:08:57 2016 +0200

    - test/message_test.rb: Fix expected exceptions if using no or a bad
      passphrase
---
 test/message_test.rb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/message_test.rb b/test/message_test.rb
index dcf4688..542e4da 100644
--- a/test/message_test.rb
+++ b/test/message_test.rb
@@ -195,16 +195,16 @@ class MessageTest < Test::Unit::TestCase
           assert_equal 'i am unencrypted', decrypted.body.to_s
         end
 
-        should "raise bad passphrase on decrypt" do
+        should "raise decrypt failed or no data on decrypt" do
           assert_equal 1, @mails.size
           assert m = @mails.first
           assert_equal 'test', m.subject
           # incorrect passphrase
-          assert_raises(GPGME::Error::BadPassphrase){
+          assert_raises(GPGME::Error::DecryptFailed){
             m.decrypt(:password => 'incorrect')
           }
           # no passphrase
-          assert_raises(GPGME::Error::BadPassphrase){
+          assert_raises(GPGME::Error::NoData){
             m.decrypt
           }
         end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-mail-gpg.git



More information about the Pkg-ruby-extras-commits mailing list