diff options
Diffstat (limited to 'app/tests/unit')
| -rwxr-xr-x | app/tests/unit/test_user_model.py | 11 | ||||
| -rw-r--r-- | app/tests/unit/test_workout_model.py | 0 |
2 files changed, 11 insertions, 0 deletions
diff --git a/app/tests/unit/test_user_model.py b/app/tests/unit/test_user_model.py new file mode 100755 index 0000000..4b6c0b3 --- /dev/null +++ b/app/tests/unit/test_user_model.py @@ -0,0 +1,11 @@ +import tables +def test_new_user(): + """ + GIVEN a User model + WHEN a new User is created + THEN check that the email, hashed_password, and role fields are defined correctly + """ + user = User('gymdude99', 'bench400soon!', 'gymdude99@gmail.com') + assert user.email == 'gymdude99@gmail.com' + assert user.hashed_password != 'bench400soon!' + assert user.role == 'user' diff --git a/app/tests/unit/test_workout_model.py b/app/tests/unit/test_workout_model.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/tests/unit/test_workout_model.py |
