diff options
author | Daniil Baturin <daniil@baturin.org> | 2017-01-16 14:45:20 +0700 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2017-01-16 14:45:20 +0700 |
commit | 299f99bf2d4f5ea566088cce1992fa1b9a2c24be (patch) | |
tree | 9e2b2af7fb8678be7b17f6762297cbbdc3d1fd73 /test | |
parent | 9ffe1e87bb9ed5cec0eacecc43282e01e8d32829 (diff) | |
download | vyconf-299f99bf2d4f5ea566088cce1992fa1b9a2c24be.tar.gz vyconf-299f99bf2d4f5ea566088cce1992fa1b9a2c24be.zip |
Remove the assumptions about validator argument being mandatory.
Diffstat (limited to 'test')
-rw-r--r-- | test/value_checker_test.ml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/value_checker_test.ml b/test/value_checker_test.ml index 3479150..16ad6e4 100644 --- a/test/value_checker_test.ml +++ b/test/value_checker_test.ml @@ -18,23 +18,23 @@ let test_check_regex_invalid test_ctxt = assert_equal (validate_value (get_dir test_ctxt) c v) false let test_check_external_valid test_ctxt = - let c = External ("anything", "") in + let c = External ("anything", None) in let v = "fgsfds" in assert_equal (validate_value (get_dir test_ctxt) c v) true let test_check_external_invalid test_ctxt = - let c = External ("nothing", "") in + let c = External ("nothing", None) in let v = "fgsfds" in assert_equal (validate_value (get_dir test_ctxt) c v) false let test_check_external_bad_validator test_ctxt = - let c = External ("invalid", "") in + let c = External ("invalid", None) in let v = "fgsfds" in assert_bool "Invalid validator was executed successfully" (raises_bad_validator (fun () -> validate_value (get_dir test_ctxt) c v)) let test_validate_any_valid test_ctxt = - let cs = [Regex "\\d+"; Regex "[a-z]+"; External ("anything", "")] in + let cs = [Regex "\\d+"; Regex "[a-z]+"; External ("anything", None)] in assert_equal (validate_any (get_dir test_ctxt) cs "AAAA") true let test_validate_any_invalid test_ctxt = |