summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/integration.clj3
-rw-r--r--tests/unit.clj11
2 files changed, 9 insertions, 5 deletions
diff --git a/tests/integration.clj b/tests/integration.clj
index 769af90..ed70e4e 100644
--- a/tests/integration.clj
+++ b/tests/integration.clj
@@ -43,7 +43,8 @@
:process-id process-id
:net-id net-id
:clients (atom {})
- :channels (atom {})}))
+ :channels (atom {})
+ :ops (atom {})}))
(defn- make-client
"Creates a simulated client connection using piped streams.
diff --git a/tests/unit.clj b/tests/unit.clj
index f2718eb..f6a74de 100644
--- a/tests/unit.clj
+++ b/tests/unit.clj
@@ -110,7 +110,8 @@
:papod.process/hostname "test"
:papod.process/started-at (java.util.Date.)}])
{:conn conn :cracha cracha-state :process-id proc-id
- :clients (atom {}) :channels (atom {})})))
+ :clients (atom {}) :channels (atom {})
+ :ops (atom {})})))
(defn test-network!
[conn]
@@ -587,7 +588,7 @@
(testing "CAP REQ unsupported capability"
(let [c (atom {:nick "x" :cap-negotiating? true})]
(is (string/includes?
- (first (handle-cap ["REQ" ":multi-prefix"] c no-conn))
+ (first (handle-cap ["REQ" ":unknown-cap"] c no-conn))
"NAK"))))
(testing "already authenticated"
(let [c (atom {:nick "x" :caps #{"sasl"} :authenticated? true})]
@@ -1258,7 +1259,8 @@
:clients (atom {"alice" {:w alice-out}
"bob" {:w bob-out}
"baz" {:w baz-out}})
- :channels (atom {"#test" #{"alice" "bob" "baz"}}))
+ :channels (atom {"#test" #{"alice" "bob" "baz"}})
+ :ops (atom {"#test" #{"alice"}}))
alice (registered-client "alice" alice-out)]
(handle-kick ["#test" "bob" ":bye!"] alice components)
;; bob removed from channel
@@ -1278,7 +1280,8 @@
(assoc (test-components)
:clients (atom {"alice" {:w alice-out}
"bob" {:w bob-out}})
- :channels (atom {"#test" #{"alice" "bob"}}))
+ :channels (atom {"#test" #{"alice" "bob"}})
+ :ops (atom {"#test" #{"alice"}}))
alice (registered-client "alice" alice-out)]
(handle-kick ["#test" "bob"] alice components)
(is (string/includes? (.toString bob-out "UTF-8")