Commits

Daniel Reverri committed 0bddba6

Added remove_links test

Comments (0)

Files changed (1)

apps/wriaki/src/wobj.erl

     undefined;
 decode_vclock(V) ->
     base64:decode(V).
+
+-include_lib("eunit/include/eunit.hrl").
+
+remove_links_test() ->
+    WObj = wobj:create(<<"bucket">>,<<"key">>,<<"value">>),
+    WObj1 = wobj:add_link(WObj, {{<<"bucket">>,<<"key">>},<<"tag">>}),
+    WObj2 = wobj:remove_links(WObj1, <<"bucket">>, <<"tag">>),
+    ?assertEqual([], wobj:get_links(WObj2)).