config: another failing test
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
|
||||
%% API
|
||||
-export([start_link/1]).
|
||||
-export([open/1]).
|
||||
-export([set/3]).
|
||||
|
||||
%% gen_server callbacks
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
-include_lib("eunit/include/eunit.hrl").
|
||||
-include("src/geef_records.hrl").
|
||||
|
||||
config_test() ->
|
||||
{foreach, fun start/0, fun stop/1, [fun bool_test/1]}.
|
||||
config_test_() ->
|
||||
{foreach, fun start/0, fun stop/1, [fun bool_test/1,
|
||||
fun string_test/1]}.
|
||||
|
||||
start() ->
|
||||
{A, B, C} = now(),
|
||||
@@ -16,7 +17,14 @@ start() ->
|
||||
bool_test({Config, _}) ->
|
||||
Var = "core.logallrefupdates",
|
||||
ok = geef_config:set(Config, Var, true),
|
||||
[?_assertEqual({ok, true}, geef_config:get_bool(Config, Var))].
|
||||
[?_assertEqual(ok, geef_config:set(Config, Var, true)),
|
||||
?_assertEqual({ok, true}, geef_config:get_bool(Config, Var))].
|
||||
|
||||
string_test({Config, _}) ->
|
||||
Var = "user.name",
|
||||
Val = <<"Random J. Hacker">>,
|
||||
ok = geef_config:set(Config, Var, Val),
|
||||
[?_assertEqual({ok, Val}, geef_config:get(Config, Var))].
|
||||
|
||||
stop({_, Path}) ->
|
||||
ok = file:delete(Path).
|
||||
|
||||
Reference in New Issue
Block a user