summaryrefslogtreecommitdiff
path: root/tests/ascdesc.ur
diff options
context:
space:
mode:
authorGravatar Artyom Shalkhakov <artyom.shalkhakov@gmail.com>2018-05-08 16:03:24 +0600
committerGravatar Artyom Shalkhakov <artyom.shalkhakov@gmail.com>2018-05-08 16:03:24 +0600
commitc293746d4c34ccb7abb8af41f7d05940aa7e4076 (patch)
tree052e8bf308ba2e2f8de626ec1426f9a3841728a3 /tests/ascdesc.ur
parente1ae0ce918c234cbb0b5a6ee72e0443bd04d4127 (diff)
Adding Selenium-based checking to tests.
Diffstat (limited to 'tests/ascdesc.ur')
-rw-r--r--tests/ascdesc.ur14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/ascdesc.ur b/tests/ascdesc.ur
index 59dd0169..fadac27d 100644
--- a/tests/ascdesc.ur
+++ b/tests/ascdesc.ur
@@ -4,7 +4,15 @@ fun sortEm b =
queryX1 (SELECT * FROM t ORDER BY t.A {if b then sql_asc else sql_desc})
(fn r => <xml>{[r.A]}; </xml>)
-fun main () : transaction page = return <xml><body>
- <a link={sortEm True}>Ascending</a><br/>
- <a link={sortEm False}>Descending</a>
+task initialize = fn () =>
+ dml (INSERT INTO t (A) VALUES (1));
+ dml (INSERT INTO t (A) VALUES (2));
+ dml (INSERT INTO t (A) VALUES (3))
+
+fun main () : transaction page =
+ p1 <- sortEm True;
+ p2 <- sortEm False;
+ return <xml><body>
+ <p>{p1}</p>
+ <p>{p2}</p>
</body></xml>