]> gitweb.factorcode.org Git - factor.git/blob - extra/webapps/mason/backend/backend-tests.factor
use ?delete-file instead of [ delete-file ] ignore-errors.
[factor.git] / extra / webapps / mason / backend / backend-tests.factor
1 USING: accessors calendar continuations db io.directories
2 io.files.temp kernel tools.test webapps.mason.backend webapps.utils ;
3 IN: webapps.mason.backend.tests
4
5 "mason-test.db" temp-file ?delete-file
6
7 { 0 1 2 } [
8     ! Do it in a with-transaction to simulate semantics of
9     ! with-mason-db
10     "mason-test.db" <temp-sqlite-db> [
11         [
12             init-mason-db
13
14             counter-value
15             increment-counter-value
16             increment-counter-value
17         ] with-transaction
18     ] with-db
19 ] unit-test
20
21 { f f } [
22     builder new now >>heartbeat-timestamp
23     [ broken? ] [ crashed? ] bi
24 ] unit-test