aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2012-02-09 20:36:47 -0500
committerBrian Cully <bjc@kublai.com>2012-02-09 20:36:47 -0500
commitfb7c9a0e24d1834dfe0c63a4cbd16464263880c2 (patch)
treef6b4ec9927da43c020947852b8183f1ba98534da
parent9689ca08ba00a8fdc4928438457bb6f56d01f99e (diff)
downloadmysqlerl-fb7c9a0e24d1834dfe0c63a4cbd16464263880c2.tar.gz
mysqlerl-fb7c9a0e24d1834dfe0c63a4cbd16464263880c2.zip
Test mysqlerl:start/0 and mysqlerl:stop/0.
Also be a little more thorough in tests and make sure things have started and stopped correctly with application:which_applications/0.
-rw-r--r--test/mysqlerl_app_SUITE.erl22
1 files changed, 19 insertions, 3 deletions
diff --git a/test/mysqlerl_app_SUITE.erl b/test/mysqlerl_app_SUITE.erl
index c8e777e..cfaa3d1 100644
--- a/test/mysqlerl_app_SUITE.erl
+++ b/test/mysqlerl_app_SUITE.erl
@@ -106,7 +106,7 @@ groups() ->
%% @end
%%--------------------------------------------------------------------
all() ->
- [app_starts, app_stops].
+ [app_starts, app_stops, mysqlerl_starts, mysqlerl_stops].
%%--------------------------------------------------------------------
%% @spec TestCase(Config0) ->
@@ -120,9 +120,25 @@ all() ->
app_starts(doc) ->
["Tests application:start/1."];
app_starts(_Config) ->
- ok = application:start(mysqlerl).
+ ok = application:start(mysqlerl),
+ {mysqlerl, _, _} = lists:keyfind(mysqlerl, 1,
+ application:which_applications()).
app_stops(doc) ->
["Tests application:stop/1."];
app_stops(_Config) ->
- ok = application:stop(mysqlerl).
+ ok = application:stop(mysqlerl),
+ false = lists:keyfind(mysqlerl, 1, application:which_applications()).
+
+mysqlerl_starts(doc) ->
+ ["Tests mysqlerl:start/0."];
+mysqlerl_starts(_Config) ->
+ ok = mysqlerl:start(),
+ {mysqlerl, _, _} = lists:keyfind(mysqlerl, 1,
+ application:which_applications()).
+
+mysqlerl_stops(doc) ->
+ ["Tests mysqlerl:stop/0."];
+mysqlerl_stops(_Config) ->
+ ok = mysqlerl:stop(),
+ false = lists:keyfind(mysqlerl, 1, application:which_applications()).