Fix simple EUnit test
diff --git a/test/bcrypt_tests.erl b/test/bcrypt_tests.erl
index c4d6370..5c1eab1 100644
--- a/test/bcrypt_tests.erl
+++ b/test/bcrypt_tests.erl
@@ -3,8 +3,11 @@
simple_test_() ->
{timeout, 1000, %% since bcrypt can take long, this is to avoid eunit timeout
- fun() ->
- Hash = bcrypt:hashpw("foo", bcrypt:gen_salt()),
- ?assert(Hash =:= bcrypt:hashpw("foo", Hash)),
- ?assertNot(Hash =:= bcrypt:hashpw("bar", Hash))
- end}.
\ No newline at end of file
+ fun() ->
+ application:start(crypto),
+ application:start(bcrypt),
+ {ok, Salt} = bcrypt:gen_salt(),
+ {ok, Hash} = bcrypt:hashpw("foo", Salt),
+ ?assert({ok, Hash} =:= bcrypt:hashpw("foo", Hash)),
+ ?assertNot({ok, Hash} =:= bcrypt:hashpw("bar", Hash))
+ end}.