File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change 132
132
@(:history c3)))))
133
133
134
134
(testing " map queries"
135
- (with-open [s (test-server )
136
- c1 (test-client )
137
- c2 (test-client )
138
- c3 (test-client )]
139
- (c1 {:funnel/whoami {:id 123 :type :x :subtype :a }})
140
- (c2 {:funnel/whoami {:id 456 :type :x :subtype :b }})
141
- (c3 {:funnel/whoami {:id 789 :type :y :subtype :b }})
142
-
143
- (c1 {:funnel/query {:type :x :subtype :b }})
144
- (will (= [{:funnel/clients
145
- [{:id 456 :type :x :subtype :b }]}]
146
- @(:history c1))))))
135
+ (let [state (atom {})]
136
+ (with-open [s (test-server state)
137
+ c1 (test-client )
138
+ c2 (test-client )
139
+ c3 (test-client )]
140
+ (c1 {:funnel/whoami {:id 123 :type :x :subtype :a }})
141
+ (c2 {:funnel/whoami {:id 456 :type :x :subtype :b }})
142
+ (c3 {:funnel/whoami {:id 789 :type :y :subtype :b }})
143
+ (will (= 3 (count @state)))
144
+
145
+ (c1 {:funnel/query {:type :x :subtype :b }})
146
+ (will (= [{:funnel/clients
147
+ [{:id 456 :type :x :subtype :b }]}]
148
+ @(:history c1)))))))
147
149
148
150
149
151
You can’t perform that action at this time.
0 commit comments