Browse files

Fix the broken auth test case.

  • Loading branch information...
1 parent d477df8 commit db2b3dcb170343fc30f8ce3ef4306867d692d736 @hdeshev hdeshev committed Apr 2, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 test/test_http_upload.rb
View
10 test/test_http_upload.rb
@@ -33,10 +33,12 @@ class TestHttpUpload < Test::Unit::TestCase
attachment = Progstr::Filer::Attachment.from_file(:version, File.open("VERSION"))
uploader = DemoUploader.new
- response = uploader.upload_attachment attachment
-
- assert_equal response.success, false
- assert_match "Session expired or authorization failed", response.message,
+ begin
+ response = uploader.upload_attachment attachment
+ assert_fail "Should throw an ApiError"
+ rescue ApiError => e
+ assert_match "Session expired or authorization failed", e.message,
+ end
ensure
Progstr::Filer.secret_key = "DEMO"
end

0 comments on commit db2b3dc

Please sign in to comment.