diff options
author | gebele <gebele@in-silico.ch> | 2014-01-13 09:13:20 +0100 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2014-01-13 09:13:20 +0100 |
commit | c576a358d838ab98fabe2416439ff4753b5add5c (patch) | |
tree | 0bf62a9b14d7e42be5754abe8101957f3b88b95a | |
parent | ad098c8ed566b0d974b9512cd8e52c575742a062 (diff) |
test zip upload with whitespace in title
-rw-r--r-- | test/toxbank-investigation-rest.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/toxbank-investigation-rest.rb b/test/toxbank-investigation-rest.rb index 971819d..70da2c3 100644 --- a/test/toxbank-investigation-rest.rb +++ b/test/toxbank-investigation-rest.rb @@ -103,12 +103,15 @@ class TBInvestigationREST < MiniTest::Test end # post a zip file with whitespace in title, - # @note expect OpenTox::BadRequestError def test_01d_upload_zip_with_whitespace_in_title file = File.join File.dirname(__FILE__), "data/toxbank-investigation/invalid", "BII\ I\ 1\ tb2.zip" - assert_raises OpenTox::BadRequestError do - response = OpenTox::RestClientWrapper.post $investigation[:uri], {:file => File.open(file)}, { :subjectid => $pi[:subjectid] } - end + response = OpenTox::RestClientWrapper.post $investigation[:uri], {:file => File.open(file)}, { :subjectid => $pi[:subjectid] } + task_uri = response.chomp + task = OpenTox::Task.new task_uri + task.wait + uri = task.resultURI + assert_equal "Completed", task.hasStatus, "Task should be completed but is: #{task.hasStatus}. Task URI is #{task_uri} ." + OpenTox::RestClientWrapper.delete uri.to_s, {}, {:subjectid => $pi[:subjectid]} end def test_01e_upload_zip_with_whitespace_in_file_title |