summaryrefslogtreecommitdiff
path: root/test/toxbank-investigation-sparql.rb
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2014-07-21 17:34:10 +0200
committergebele <gebele@in-silico.ch>2014-07-21 17:34:10 +0200
commita72f64283bf332043cdc537805750740312621b8 (patch)
tree96b28fd1b81599a09c4bf55b3c88d879493ac474 /test/toxbank-investigation-sparql.rb
parentefa601e1d7d6572a55d753e765f7ac6e78fd915a (diff)
extended test vor gene identifiers
Diffstat (limited to 'test/toxbank-investigation-sparql.rb')
-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 6bfefc7..173e55e 100644
--- a/test/toxbank-investigation-sparql.rb
+++ b/test/toxbank-investigation-sparql.rb
@@ -350,6 +350,12 @@ class TBSPARQLTestExtended < MiniTest::Test
assert inv_genes.include?("#{@@uri}:::http://onto.toxbank.net/isa/bii/data_types/microarray_derived_data:::q-value[Low.8hr-Control.8hr]:::http://onto.toxbank.net/isa/qvalue:::0.911237")
end
+ def test_19_b_investigation_by_genes
+ assert_raises OpenTox::BadRequestError do
+ response = OpenTox::RestClientWrapper.get "#{$investigation[:uri]}/sparql/investigation_by_genes", {:geneIdentifiers => "['entrez3075', 'uniprot:P10809']"}, {:accept => "application/json", :subjectid => $pi[:subjectid]}
+ end
+ end
+
def test_20_investigation_by_gene_and_value
# check for FC, pValue, qValue
["FC", "pvalue", "qvalue"].each do |value_type|
@@ -364,13 +370,16 @@ class TBSPARQLTestExtended < MiniTest::Test
end
def test_21_investigation_by_gene_and_value
- # check valid request
+ # check for valid request
assert_raises OpenTox::BadRequestError do
response = OpenTox::RestClientWrapper.get "#{$investigation[:uri]}/sparql/investigation_by_gene_and_value", {:geneIdentifiers => "['entrez:3075', 'uniprot:P10809']", :value => "FC0.7"}, {:accept => "application/json", :subjectid => $pi[:subjectid]}
end
assert_raises OpenTox::BadRequestError do
response = OpenTox::RestClientWrapper.get "#{$investigation[:uri]}/sparql/investigation_by_gene_and_value", {:geneIdentifiers => "['entrez:3075', 'uniprot:P10809']", :value => "DC=0.7"}, {:accept => "application/json", :subjectid => $pi[:subjectid]}
end
+ assert_raises OpenTox::BadRequestError do
+ response = OpenTox::RestClientWrapper.get "#{$investigation[:uri]}/sparql/investigation_by_gene_and_value", {:geneIdentifiers => "['entrez3075']", :value => "DC:0.7"}, {:accept => "application/json", :subjectid => $pi[:subjectid]}
+ end
end
# delete investigation/{id}