Skip to content

Commit 2cfd3fe

Browse files
committed
Fix tests
1 parent 4f9df56 commit 2cfd3fe

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

test/eca/remote/auth_test.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
[eca.remote.auth :as auth]))
66

77
(deftest generate-token-test
8-
(testing "generates a 64-character hex string"
8+
(testing "generates a 5-character alphanumeric string"
99
(let [token (auth/generate-token)]
10-
(is (= 64 (count token)))
11-
(is (re-matches #"[0-9a-f]{64}" token))))
10+
(is (= 5 (count token)))
11+
(is (re-matches #"[a-z0-9]{5}" token))))
1212

1313
(testing "generates unique tokens"
1414
(let [tokens (repeatedly 10 auth/generate-token)]

test/eca/remote/handlers_test.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323

2424
(deftest handle-root-test
2525
(testing "redirects to web.eca.dev"
26-
(let [response (handlers/handle-root nil nil {:host "192.168.1.1:7888" :token "abc123"})]
26+
(let [response (handlers/handle-root nil nil {:host "192.168.1.1:7888" :password "abc123"})]
2727
(is (= 302 (:status response)))
28-
(is (= "https://web.eca.dev?host=192.168.1.1:7888&token=abc123"
28+
(is (= "https://web.eca.dev?host=192.168.1.1:7888&pass=abc123"
2929
(get-in response [:headers "Location"]))))))
3030

3131
(deftest handle-list-chats-test

0 commit comments

Comments
 (0)