diff options
Diffstat (limited to 'test')
-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 |