summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2014-05-19 10:39:47 +0200
committergebele <gebele@in-silico.ch>2014-05-19 10:39:47 +0200
commit63d396b886b28a6bd1fb849c21ad7bd66e71bfa8 (patch)
tree82527848d4e227b6553772b335b51b98fd50f677
parenta1770e6e22b5012cb4420c4a72a831f609d6defd (diff)
expect error for update of unformated to isatab
-rw-r--r--test/toxbank-investigation-types.rb24
1 files changed, 3 insertions, 21 deletions
diff --git a/test/toxbank-investigation-types.rb b/test/toxbank-investigation-types.rb
index 09897af..a5fa45d 100644
--- a/test/toxbank-investigation-types.rb
+++ b/test/toxbank-investigation-types.rb
@@ -567,27 +567,9 @@ class TBInvestigationNoISADataValidPOSTchangeType < MiniTest::Test
task = OpenTox::Task.new task_uri
task.wait
#puts task.uri
- uri = task.resultURI
- assert_equal "Completed", task.hasStatus, "Task should be completed but is: #{task.hasStatus}. Task URI is #{task_uri} ."
- response = OpenTox::RestClientWrapper.get($investigation[:uri], {}, { :accept=>"text/uri-list", :subjectid => $pi[:subjectid] }).split("\n").size
- sleep 2
- # check files
- response = OpenTox::RestClientWrapper.get(uri, {}, { :accept=>"text/uri-list", :subjectid => $pi[:subjectid] }).chomp
- #puts response
- assert_match uri+"/isatab/"+uri.split("/").last+".nt", response, "uri-list should match #{uri+"/isatab/"+uri.split("/").last+".nt"} but is #{response}"
- assert_match uri+"/isatab/"+"BII-I-1-tb2.zip", response, "uri-list should match #{uri+"/isatab/"+"BII-I-1-tb2.zip"} but is #{response}"
- assert_match uri+"/isatab/"+"a_metabolome.txt", response, "uri-list should match #{uri+"/isatab/"+"a_metabolome.txt"} but is #{response}"
- assert_match uri+"/isatab/"+"a_microarray.txt", response, "uri-list should match #{uri+"/isatab/"+"a_microarray.txt"} but is #{response}"
- assert_match uri+"/isatab/"+"a_proteome.txt", response, "uri-list should match #{uri+"/isatab/"+"a_proteome.txt"} but is #{response}"
- assert_match uri+"/isatab/"+"a_transcriptome.txt", response, "uri-list should match #{uri+"/isatab/"+"a_transcriptome.txt"} but is #{response}"
- assert_match uri+"/isatab/"+"i_Investigation.txt", response, "uri-list should match #{uri+"/isatab/"+"i_Investigation.txt"} but is #{response}"
- assert_match uri+"/isatab/"+"investigation_#{uri.split("/").last}.zip", response, "uri-list should match #{uri+"/isatab/"+"investigation_#{uri.split("/").last}.zip"} but is #{response}"
- assert_match uri+"/isatab/"+"s_BII-S-1.txt", response, "uri-list should match #{uri+"/isatab/"+"s_BII-S-1.txt"} but is #{response}"
- assert_match uri+"/isatab/"+"s_BII-S-2.txt", response, "uri-list should match #{uri+"/isatab/"+"s_BII-S-2.txt"} but is #{response}"
- # refute
- refute_match uri+"/files/"+"unformated.zip", response, "uri-list should match #{uri+"/files/"+"unformated.zip"} but is #{response}"
- refute_match uri+"/files/"+"JIC37_Ethanol_0.07_Internal_1_4.txt", response, "uri-list should not match #{uri+"/files/"+"JIC37_Ethanol_0.07_Internal_1_4.txt"} but is #{response}"
-
+ #uri = task.resultURI
+ assert_equal "Error", task.hasStatus, "Task should be not completed but is: #{task.hasStatus}. Task URI is #{task_uri} ."
+ assert_match "Unable to edit unformated investigation with ISA-TAB data.", task.error_report[RDF::OT.message], "wrong error: #{task.error_report[RDF::OT.message]}."
# DELETE
response = OpenTox::RestClientWrapper.delete uri, {}, { :subjectid => $pi[:subjectid] }
assert_equal "200", response.code.to_s