26 lines
666 B
Erlang
26 lines
666 B
Erlang
-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)),
|