3 ;;(:use [helpers] :reload-all)
4 ;;(:use [depth_adapter])
7 ;;(:use [clojure.test])
8 ;;(:import java.io.ByteArrayInputStream)
9 ;;(:require clojure.contrib.str-utils)
10 ;;(:require commands.add)
18 (import 'java.io.ByteArrayInputStream)
19 (require 'clojure.contrib.str-utils)
20 (require 'commands.add)
22 (def configs (load-file "etc/config/config.test.clj"))
26 (defn test-fixture-shell
27 "Initialize the shell"
30 (println "test-fixture-shell CALLED")
36 "test to clear out shell memory before a test is run"
39 (println "test-fixture-db CALLED")
40 ;; make the shell active
42 (alter bkell/shell conj
45 ;; create a basic user in the DB
46 (add-user (:url-test configs) (:system-dir configs) { :tag "user" :attrs { :id "test.user" } } )
48 ;; ** execute the TEST function
51 ;; make the shell inactive
53 (alter bkell/shell conj
58 (use-fixtures :once login-test/test-fixture-shell )
59 (use-fixtures :each login-test/test-fixture-db )
62 (deftest test-login []
68 ;; test result when already logged in
69 (deftest test-existing-login []
75 ;; test a login with a bad password
76 (deftest test-bad-password []
83 (deftest test-logout []