From 14c6f701999c7e27a6350f5cedc06cf91f05ebc0 Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Tue, 12 Jun 2007 23:30:17 +0000 Subject: [PATCH] passwords test svn: r6613 --- .../tests/dispatchers/dispatch-passwords-test.ss | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/collects/web-server/tests/dispatchers/dispatch-passwords-test.ss b/collects/web-server/tests/dispatchers/dispatch-passwords-test.ss index 3cd0da93cd..cfd8dbb362 100644 --- a/collects/web-server/tests/dispatchers/dispatch-passwords-test.ss +++ b/collects/web-server/tests/dispatchers/dispatch-passwords-test.ss @@ -1,17 +1,18 @@ (module dispatch-passwords-test mzscheme (require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) + (planet "util.ss" ("schematics" "schemeunit.plt" 2)) (lib "file.ss") (lib "url.ss" "net") (lib "list.ss") - (lib "xml.ss" "xml") (lib "request-structs.ss" "web-server" "private") - (lib "util.ss" "web-server" "private") (lib "dispatch.ss" "web-server" "dispatchers") (prefix passwords: (lib "dispatch-passwords.ss" "web-server" "dispatchers")) "../util.ss") (provide dispatch-passwords-tests) - ; XXX Backwards way of testing distribution file + (require/expose (lib "dispatch-passwords.ss" "web-server" "dispatchers") + (read-passwords)) + (define default-passwords (build-path (collection-path "web-server") "default-web-root" "passwords")) (define test-passwords (make-temporary-file)) (define (write-test-passwords!) @@ -44,6 +45,10 @@ (test-suite "Passwords" + (test-not-false + "Distribution file parses" + (read-passwords default-passwords)) + (test-exn "authorized" exn:dispatcher? (lambda () (runt #t #t))) @@ -59,6 +64,6 @@ (lambda () (runt #f #t))) - ; XXX refresh cache + ; XXX test refresh cache ))) \ No newline at end of file