Move web application into /web.
This commit is contained in:
7
web/test/ts_test_common.erl
Normal file
7
web/test/ts_test_common.erl
Normal file
@ -0,0 +1,7 @@
|
||||
-module(ts_test_common).
|
||||
-compile(export_all).
|
||||
|
||||
-include_lib("eunit/include/eunit.hrl").
|
||||
-include_lib("../src/ts_db_records.hrl").
|
||||
|
||||
|
25
web/test/ts_user_tests.erl
Normal file
25
web/test/ts_user_tests.erl
Normal file
@ -0,0 +1,25 @@
|
||||
-module(ts_user_tests).
|
||||
%-import(ts_test_common, [assertRecordsEqual/2]).
|
||||
|
||||
-include_lib("eunit/include/eunit.hrl").
|
||||
-include_lib("../src/ts_db_records.hrl").
|
||||
|
||||
setup() -> ts_test_env:setup().
|
||||
|
||||
cleanup(_Status) -> ts_api_env:cleanup(ok).
|
||||
|
||||
% ======== TEST DATA ======== %
|
||||
|
||||
joe_user() -> #ts_user{username=joeuser, name="Joe User", pwd="ohmy",
|
||||
email="JoeUser@users.org",
|
||||
join_date=calendar:now_to_datetime(erlang:now())}.
|
||||
|
||||
% ======== TESTS ======== %
|
||||
|
||||
%new_delete_test_() ->
|
||||
% test data
|
||||
%JoeUser = joe_user(),
|
||||
|
||||
%{setup, fun setup/0, fun cleanup/1, {inorder, [
|
||||
% ?_test(new(JoeUser)),
|
||||
% ?_test(lookup(JoeUser#ts_user.username, JoeUser)),
|
Reference in New Issue
Block a user