summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2014-06-02 12:47:24 +0200
committergebele <gebele@in-silico.ch>2014-06-02 12:47:24 +0200
commit4f6aae573b8db4a4bc5ba730ad0af4526eff8284 (patch)
treeb400b44e22770811a2ea02d8e499ba527fd3e5f2
parent95439e3c8dcf7cc4cfcd4b08b1e0fe5f83ccb25e (diff)
ensure inv gets deleted
-rw-r--r--test/toxbank-investigation-types.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/toxbank-investigation-types.rb b/test/toxbank-investigation-types.rb
index 262af25..d3056ce 100644
--- a/test/toxbank-investigation-types.rb
+++ b/test/toxbank-investigation-types.rb
@@ -309,7 +309,7 @@ class TBInvestigationNoISADataValidPOST < MiniTest::Test
@g.query(:predicate => RDF::DC.abstract){|r| assert_match /This is a short description/, r[2].to_s}
@g.query(:predicate => RDF::TB.isSummarySearchable){|r| assert_match /false/, r[2].to_s}
@g.query(:predicate => RDF::TB.isPublished){|r| assert_match /false/, r[2].to_s}
-
+ ensure
# DELETE
response = OpenTox::RestClientWrapper.delete uri.to_s, {}, { :subjectid => $pi[:subjectid] }
assert_equal "200", response.code.to_s
@@ -397,7 +397,7 @@ class TBInvestigationNoISADataValidPOST < MiniTest::Test
@g.query(:predicate => RDF::DC.abstract){|r| assert_match /This is a short description/, r[2].to_s}
@g.query(:predicate => RDF::TB.isSummarySearchable){|r| assert_match /false/, r[2].to_s}
@g.query(:predicate => RDF::TB.isPublished){|r| assert_match /false/, r[2].to_s}
-
+ ensure
# DELETE
response = OpenTox::RestClientWrapper.delete uri.to_s, {}, { :subjectid => $pi[:subjectid] }
assert_equal "200", response.code.to_s
@@ -476,7 +476,7 @@ class TBInvestigationNoISADataValidPOST < MiniTest::Test
@g.query(:predicate => RDF::DC.abstract){|r| assert_match /This is a short description/, r[2].to_s}
@g.query(:predicate => RDF::TB.isSummarySearchable){|r| assert_match /false/, r[2].to_s}
@g.query(:predicate => RDF::TB.isPublished){|r| assert_match /false/, r[2].to_s}
-
+ ensure
# DELETE
response = OpenTox::RestClientWrapper.delete uri.to_s, {}, { :subjectid => $pi[:subjectid] }
assert_equal "200", response.code.to_s
@@ -501,7 +501,7 @@ class TBInvestigationNoISADataValidPOST < MiniTest::Test
#@g.each{|g| puts g.object}
@g.query(:predicate => RDF::TB.hasInvType){|r| assert_match /unformattedData/, r[2].to_s}
@g.query(:predicate => RDF::TB.hasDownload){|r| assert_match /#{uri}\/files\/un%20formated\.zip/, r[2].to_s}
-
+ ensure
# DELETE
response = OpenTox::RestClientWrapper.delete uri.to_s, {}, { :subjectid => $pi[:subjectid] }
assert_equal "200", response.code.to_s
@@ -536,7 +536,7 @@ class TBInvestigationNoISADataValidPOST < MiniTest::Test
assert_equal "Error", task.hasStatus, "Task should be not completed but is: #{task.hasStatus}. Task URI is #{task_uri} ."
assert_match "Parameter 'title' is required.", task.error_report[RDF::OT.message], "wrong error: #{task.error_report[RDF::OT.message]}."
-
+ ensure
# DELETE
response = OpenTox::RestClientWrapper.delete uri.to_s, {}, { :subjectid => $pi[:subjectid] }
assert_equal "200", response.code.to_s
@@ -600,6 +600,7 @@ class TBInvestigationNoISADataValidPOSTchangeType < MiniTest::Test
#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]}."
+ ensure
# DELETE
response = OpenTox::RestClientWrapper.delete uri, {}, { :subjectid => $pi[:subjectid] }
assert_equal "200", response.code.to_s