diff options
Diffstat (limited to 'test/toxbank-investigation-rest.rb')
-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 |