diff options
author | gebele <gebele@in-silico.ch> | 2014-12-17 10:27:19 +0100 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2014-12-17 10:27:19 +0100 |
commit | 0a6c2207363787aae422100cfe34b5eb537f55e4 (patch) | |
tree | 5bfee2cbd4427c1b3330ec09effeccd94b8504ca | |
parent | 2e16fd539c06d890ab560765f98fdfda24884032 (diff) |
added test for relational operator in bio materials search
-rw-r--r-- | test/toxbank-investigation-sparql.rb | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/toxbank-investigation-sparql.rb b/test/toxbank-investigation-sparql.rb index e05b7a5..2043ec4 100644 --- a/test/toxbank-investigation-sparql.rb +++ b/test/toxbank-investigation-sparql.rb @@ -359,10 +359,25 @@ class TBSPARQLTestExtended < MiniTest::Test def test_20_investigation_by_gene_and_value # check for FC, pValue, qValue + # with relOperator = below ["FC", "pvalue", "qvalue"].each do |value_type| response = OpenTox::RestClientWrapper.get "#{$investigation[:uri]}/sparql/investigation_by_gene_and_value", {:geneIdentifiers => "['entrez:3075', 'uniprot:P10809']", :value => "#{value_type}:0.5", :relOperator => "below"}, {:accept => "application/json", :subjectid => $pi[:subjectid]} result = JSON.parse(response) - puts response + #puts response + ["investigation", "datatype", "title", "value"].each do |v| + assert result["head"]["vars"].include?(v.to_s) + end + assert_equal 200, response.code + end + end + + def test_20_investigation_by_gene_and_value_a + # check for FC, pValue, qValue + # with relOperator = above + ["FC", "pvalue", "qvalue"].each do |value_type| + response = OpenTox::RestClientWrapper.get "#{$investigation[:uri]}/sparql/investigation_by_gene_and_value", {:geneIdentifiers => "['entrez:3075', 'uniprot:P10809']", :value => "#{value_type}:0.5", :relOperator => "above"}, {:accept => "application/json", :subjectid => $pi[:subjectid]} + result = JSON.parse(response) + #puts response ["investigation", "datatype", "title", "value"].each do |v| assert result["head"]["vars"].include?(v.to_s) end |