From c89da6060c01f622b8e880b4ac6bb66cf00a1173 Mon Sep 17 00:00:00 2001 From: rautenberg Date: Fri, 20 Dec 2013 16:42:41 +0100 Subject: test for number of linked files in template files_by_investigation --- test/toxbank-investigation-sparql.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/toxbank-investigation-sparql.rb b/test/toxbank-investigation-sparql.rb index 7a5b75b..e47bc56 100644 --- a/test/toxbank-investigation-sparql.rb +++ b/test/toxbank-investigation-sparql.rb @@ -107,6 +107,13 @@ class TBSPARQLTest < MiniTest::Test assert_equal 200, response.code end + def test_09_files_by_investigation + response = OpenTox::RestClientWrapper.get "#{@@uri}/sparql/files_by_investigation", {}, {:accept => "application/json", :subjectid => $pi[:subjectid]} + result = JSON.parse(response) + files = result["results"]["bindings"].map{|n| "#{n["file"]["value"]}"} + assert_equal 180, files.size + end + def test_13_investigation_by_characteristic_value response = OpenTox::RestClientWrapper.get "#{$investigation[:uri]}/sparql/investigation_by_characteristic_value", {:value => "Saccharomyces cerevisiae (Baker's yeast)"}, {:accept => "application/json", :subjectid => $pi[:subjectid]} result = JSON.parse(response) -- cgit v1.2.3