add test for cursor variadic swap!

This commit is contained in:
Stephen Caraher 2015-07-23 23:10:35 +10:00
parent 1363e05e62
commit e8cd105348
1 changed files with 6 additions and 0 deletions

View File

@ -336,6 +336,12 @@
(is (= (get-in @test-atom [])
{:z 3}))
(reset! test-cursor {}) ;; empty map
(swap! test-cursor assoc :x 1 :y 2 :z 3 :w)
(is (= @test-cursor {:x 1 :y 2 :z 3 :w nil}))
(is (= (get-in @test-atom [:a :b :c :d])
{:x 1 :y 2 :z 3 :w nil}))
(is (= runs (running)))))