]> gitweb.factorcode.org Git - factor.git/blob - contrib/furnace/test/responder.factor
1ae0a4f1eb7cb13e2b3c2e79ec56d37b7278ea9d
[factor.git] / contrib / furnace / test / responder.factor
1 IN: temporary
2 USING: test namespaces furnace ;
3
4 : foo ;
5
6 \ foo { { "foo" "2" } { "bar" f } } define-action
7
8 [
9     { "2" "hello" }
10 ] [
11     [
12         H{
13             { "bar" "hello" }
14         } "query" set
15
16         \ foo query>quot
17     ] with-scope
18 ] unit-test
19
20 [
21     H{ { "foo" "1" } { "bar" "2" } }
22 ] [
23     { "1" "2" } \ foo quot>query
24 ] unit-test
25
26 [
27     "/responder/bar/foo?foo=3"
28 ] [
29     [
30         "bar" "responder" set
31         [ "3" foo ] quot-link
32     ] with-scope
33 ] unit-test