diff --git a/spec/cljs/state_spec.cljs b/spec/cljs/state_spec.cljs index b568cab..d0ea1f7 100644 --- a/spec/cljs/state_spec.cljs +++ b/spec/cljs/state_spec.cljs @@ -24,7 +24,8 @@ (it "should complete a grub in the state when a complete event comes" (let [test-grub {:_id 234243 :grub "testgrub" :completed false} expected-grub (assoc test-grub :completed true) - complete-event (-> (select-keys [:_id]) + complete-event (-> test-grub + (select-keys [:_id]) (assoc :event :complete))] (reset! state/grubs [test-grub]) (state/handle-event complete-event) @@ -34,7 +35,8 @@ (it "should uncomplete a grub in the state when an uncomplete event comes" (let [test-grub {:_id 234243 :grub "testgrub" :completed true} expected-grub (assoc test-grub :completed false) - complete-event (-> (select-keys [:_id]) + complete-event (-> test-grub + (select-keys [:_id]) (assoc :event :uncomplete))] (reset! state/grubs [test-grub]) (state/handle-event complete-event) @@ -60,7 +62,7 @@ (it "should generate an _id for the new grub" (let [test-grub {:grub "testgrub"} create-event (assoc test-grub :event :create)] - (state/handle-event create-event) + (state/handle-view-event create-event) (js/setTimeout (fn [] (let [added-grub (first (filter #(= (:grub %) (:grub test-grub)) @state/grubs))]