diff options
author | rautenberg <rautenberg@in-silico.ch> | 2013-12-20 16:42:41 +0100 |
---|---|---|
committer | rautenberg <rautenberg@in-silico.ch> | 2013-12-20 16:42:41 +0100 |
commit | c89da6060c01f622b8e880b4ac6bb66cf00a1173 (patch) | |
tree | 39dd489a39558551dd723f0f625cd7d5350941fd | |
parent | 7c1d6390683e568c1fed640da20a72493b8f8e8c (diff) |
test for number of linked files in template files_by_investigation
-rw-r--r-- | test/toxbank-investigation-sparql.rb | 7 |
1 files changed, 7 insertions, 0 deletions
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) |