Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix the broken auth test case.

  • Loading branch information...
commit db2b3dcb170343fc30f8ce3ef4306867d692d736 1 parent d477df8
Hristo Deshev authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.