tvl-depot/web/panettone/test/model_test.lisp
Griffin Smith 8e7ba41a34 feat(web/panettone): Log when users change issue statuses
Log in the database, in a way that will generalize to tracking edit
history as well, when users change the status of an issue. To facilitate
easily knowing who is currently authenticated (without introducing a
circular dependency) the authentication-relaated code has also been
factored out into its own package, which is nice because we want to
replace that sooner rather than later anyway.

Fixes: #13
Change-Id: I65a544fab660ed1c295ee8f6b293e0d4945a8203
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1496
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-31 02:05:49 +00:00

13 lines
462 B
Common Lisp

(in-package :panettone.tests)
(declaim (optimize (safety 3)))
(test initialize-issue-status-test
(let ((issue (make-instance 'model:issue :status "open")))
(is (eq :open (model:status issue)))))
(test initialize-issue-created-at-test
(let* ((time (get-universal-time))
(issue (make-instance 'model:issue :created-at time)))
(is (local-time:timestamp=
(local-time:universal-to-timestamp time)
(model:created-at issue)))))