summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2014-08-26 17:03:42 +0200
committergebele <gebele@in-silico.ch>2014-08-26 17:03:42 +0200
commit09f3bf09e5262191ff33d96471fe706e069c41db (patch)
tree7633339a292510e5baa2d7f66e49e9e90ce2dd79
parentfb3b386746b4b393afc364c457a24b5a7d36f42a (diff)
added flags test for non-isatab
-rw-r--r--test/toxbank-investigation-types.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/toxbank-investigation-types.rb b/test/toxbank-investigation-types.rb
index 0eef6b3..27b9831 100644
--- a/test/toxbank-investigation-types.rb
+++ b/test/toxbank-investigation-types.rb
@@ -606,7 +606,21 @@ class TBInvestigationNoISADataValidPOSTchangeType < MiniTest::Test
#puts task.uri
#uri = task.resultURI
assert_equal "Error", task.hasStatus, "Task should be not completed but is: #{task.hasStatus}. Task URI is #{task_uri} ."
- assert_match "Expected type is 'noData'.", task.error_report[RDF::OT.message], "wrong error: #{task.error_report[RDF::OT.message]}."
+ assert_match "Unable to edit unformatted investigation with ISA-TAB data.", task.error_report[RDF::OT.message], "wrong error: #{task.error_report[RDF::OT.message]}."
+
+ puts "\nset flag isPublished"
+ response = OpenTox::RestClientWrapper.put uri, {:published => "true"}, { :subjectid => $pi[:subjectid] }
+ task_uri = response.chomp
+ task = OpenTox::Task.new task_uri
+ task.wait
+ assert_equal "Completed", task.hasStatus, "Task should be completed but is: #{task.hasStatus}. Task URI is #{task_uri} ."
+
+ puts "\nset flag summarySearchable"
+ response = OpenTox::RestClientWrapper.put uri, {:summarySearchable => "true"}, { :subjectid => $pi[:subjectid] }
+ task_uri = response.chomp
+ task = OpenTox::Task.new task_uri
+ task.wait
+ assert_equal "Completed", task.hasStatus, "Task should be completed but is: #{task.hasStatus}. Task URI is #{task_uri} ."
ensure
# DELETE
response = OpenTox::RestClientWrapper.delete uri, {}, { :subjectid => $pi[:subjectid] }