2016-03-30 18:18:20 -04:00
|
|
|
USING: accessors calendar continuations db io.directories
|
|
|
|
io.files.temp kernel tools.test webapps.mason.backend webapps.utils ;
|
2010-09-17 02:52:49 -04:00
|
|
|
IN: webapps.mason.backend.tests
|
2010-09-04 21:05:28 -04:00
|
|
|
|
2016-07-10 23:28:46 -04:00
|
|
|
"mason-test.db" temp-file ?delete-file
|
2010-09-04 21:05:28 -04:00
|
|
|
|
2015-07-03 12:39:59 -04:00
|
|
|
{ 0 1 2 } [
|
2010-09-30 23:35:35 -04:00
|
|
|
! Do it in a with-transaction to simulate semantics of
|
|
|
|
! with-mason-db
|
2015-10-03 21:41:32 -04:00
|
|
|
"mason-test.db" <temp-sqlite-db> [
|
2010-09-30 23:35:35 -04:00
|
|
|
[
|
|
|
|
init-mason-db
|
2010-09-04 21:05:28 -04:00
|
|
|
|
2010-09-30 23:35:35 -04:00
|
|
|
counter-value
|
|
|
|
increment-counter-value
|
|
|
|
increment-counter-value
|
|
|
|
] with-transaction
|
2010-09-04 21:05:28 -04:00
|
|
|
] with-db
|
|
|
|
] unit-test
|
2016-03-30 18:18:20 -04:00
|
|
|
|
|
|
|
{ f f } [
|
|
|
|
builder new now >>heartbeat-timestamp
|
|
|
|
[ broken? ] [ crashed? ] bi
|
|
|
|
] unit-test
|