diff options
author | Pjotr Prins | 2016-09-26 14:38:27 +0000 |
---|---|---|
committer | Pjotr Prins | 2016-09-26 14:38:27 +0000 |
commit | 3fa5e9c2effdab27ba9492203a875d01ddae766c (patch) | |
tree | 70dceae8532a732d8dc93c20d3c8d697bc6b3b87 /test/lib | |
parent | 2d04ad9552f5b3f0551c31797f8fa714e3af4c7a (diff) | |
download | genenetwork2-3fa5e9c2effdab27ba9492203a875d01ddae766c.tar.gz |
Test: added mechanize test for CIM (reaper)
Diffstat (limited to 'test/lib')
-rw-r--r-- | test/lib/mapping.rb | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/test/lib/mapping.rb b/test/lib/mapping.rb index 1b52d797..4c8ff632 100644 --- a/test/lib/mapping.rb +++ b/test/lib/mapping.rb @@ -20,9 +20,9 @@ describe MappingTest do # p json page = @agent.post(URI.encode(url), json) # Unpacking the page is slow - but the run is enough as a test - # form = page.forms[1] # form = page.forms_with("marker_regression")[0] - # form.fields.select { |fld| fld.name == 'corr_dataset' }.first.value.must_equal 'HC_M2_0606_P' + # form.fields.select { |fld| fld.name == 'dataset' }.first.value.must_equal 'HC_M2_0606_P' + # form.fields.select { |fld| fld.name == 'value:BXD1' }.first.value.must_equal '6.749' end end @@ -35,7 +35,22 @@ describe MappingTest do page = @agent.post(URI.encode(url), json, ({'Content-Type' => 'application/x-www-form-urlencoded'})) - p page + form = page.forms_with("marker_regression")[0] + form.fields.select { |fld| fld.name == 'dataset' }.first.value.must_equal 'HC_M2_0606_P' + form.fields.select { |fld| fld.name == 'value:BXD1' }.first.value.must_equal '6.749' + end + end + + describe MappingTest do + it "CIM mapping tool selection (using reaper)" do + url = $host+'/marker_regression' + + json = JSON::load(File.read('test/data/input/mapping/1435395_s_at_HC_M2_0606_P.json')) + json["method"] = "reaper" + page = @agent.post(URI.encode(url), json) + form = page.forms_with("marker_regression")[0] + form.fields.select { |fld| fld.name == 'dataset' }.first.value.must_equal 'HC_M2_0606_P' + form.fields.select { |fld| fld.name == 'value:BXD1' }.first.value.must_equal '6.749' end end |