summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2014-03-14 11:51:29 +0100
committergebele <gebele@in-silico.ch>2014-03-14 11:51:29 +0100
commitff3b8a71fc676762ce6649427a0a7e937788d2da (patch)
tree0b805ed85d2755f95828d4dcfe686126ac5d5b1f
parentbcb87318ae61e2c2e326064be8e24df330cc5c38 (diff)
added test for files_by_investigation template
-rw-r--r--test/toxbank-investigation-sparql.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/toxbank-investigation-sparql.rb b/test/toxbank-investigation-sparql.rb
index cd8aa97..643300c 100644
--- a/test/toxbank-investigation-sparql.rb
+++ b/test/toxbank-investigation-sparql.rb
@@ -249,7 +249,16 @@ class TBSPARQLTestExtended < MiniTest::Test
assert factors.include?("dose:::0::::::http://purl.obolibrary.org/obo/UO_0000064:::micromolar:::UO:0000064")
assert factors.include?("compound:::DOXORUBICIN:::http://purl.obolibrary.org/chebi/CHEBI:28748:::::::::")
end
-
+
+ def test_05_files_by_investigation
+ response = OpenTox::RestClientWrapper.get "#{@@uri}/sparql/files_by_investigation", {}, {:accept => "application/json", :subjectid => $pi[:subjectid]}
+ result = JSON.parse(response)
+ #puts result
+ ["assay", "assayFile", "endpoint", "endpointLabel", "platform", "technology", "techLabel", "file", "term"].each do |v|
+ assert result["head"]["vars"].include?(v.to_s)
+ end
+ end
+
# Retrieves protocol URI containing any of the factor value URI (e.g. two compound URIs)
def test_10_protocols_by_factors
response = OpenTox::RestClientWrapper.get "#{$investigation[:uri]}/sparql/protocols_by_factors", {:factorValues => "['http://purl.obolibrary.org/chebi/CHEBI:28748']"}, {:accept => "application/json", :subjectid => $pi[:subjectid]}