diff options
Diffstat (limited to 'test/etap/080-config-get-set.t')
-rwxr-xr-x | test/etap/080-config-get-set.t | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/test/etap/080-config-get-set.t b/test/etap/080-config-get-set.t index 8cd6a9e6..7abd8a0a 100755 --- a/test/etap/080-config-get-set.t +++ b/test/etap/080-config-get-set.t @@ -19,23 +19,23 @@ main(_) -> test() -> % start couch_config with default couch_config:start_link([default_config()]), - - + + % Check that we can get values - - + + etap:fun_is( fun(List) -> length(List) > 0 end, couch_config:all(), "Data was loaded from the INI file." ), - + etap:fun_is( fun(List) -> length(List) > 0 end, couch_config:get("daemons"), "There are settings in the [daemons] section of the INI file." ), - + etap:is( couch_config:get("httpd_design_handlers", "_view"), "{couch_httpd_view, handle_view_req}", @@ -47,13 +47,13 @@ test() -> "bar", "Returns the default when key doesn't exist in config." ), - + etap:is( couch_config:get("httpd", "foo"), undefined, "The default default is the atom 'undefined'." ), - + etap:is( couch_config:get("httpd", "port", "bar"), "5984", @@ -63,43 +63,43 @@ test() -> % Check that setting values works. - + ok = couch_config:set("log", "level", "severe", false), - + etap:is( couch_config:get("log", "level"), "severe", "Non persisted changes take effect." ), - + etap:is( couch_config:get("new_section", "bizzle"), undefined, "Section 'new_section' does not exist." ), - + ok = couch_config:set("new_section", "bizzle", "bang", false), - + etap:is( couch_config:get("new_section", "bizzle"), "bang", "New section 'new_section' was created for a new key/value pair." ), - - + + % Check that deleting works - - + + ok = couch_config:delete("new_section", "bizzle", false), etap:is( couch_config:get("new_section", "bizzle"), "", "Deleting sets the value to \"\"" ), - - + + % Check ge/set/delete binary strings - + ok = couch_config:set(<<"foo">>, <<"bar">>, <<"baz">>, false), etap:is( couch_config:get(<<"foo">>, <<"bar">>), @@ -112,5 +112,5 @@ test() -> "", "Deleting with binary section/key pairs sets the value to \"\"" ), - + ok. |