From 75905627b623bcffe00b8efb611835ad2d191447 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Sun, 24 Apr 2016 22:53:51 +0300 Subject: [PATCH] Fix tests. --- test/uxbox/state/shapes_tests.cljs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/uxbox/state/shapes_tests.cljs b/test/uxbox/state/shapes_tests.cljs index 9276c9ed2..40e05a8c5 100644 --- a/test/uxbox/state/shapes_tests.cljs +++ b/test/uxbox/state/shapes_tests.cljs @@ -1,6 +1,7 @@ (ns uxbox.state.shapes-tests (:require [cljs.test :as t :include-macros true] [cljs.pprint :refer (pprint)] + [uuid.core :as uuid] [uxbox.state.shapes :as ssh])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -24,13 +25,12 @@ (assoc-in [:pages-by-id 1 :shapes] [1 2]) (assoc-in [:shapes-by-id 2] {:id 2 :page 1}))] - (with-redefs [cljs.core/random-uuid (constantly 2)] + (with-redefs [uuid.core/random (constantly 2)] (let [result (ssh/duplicate-shapes initial [1])] ;; (pprint expected) ;; (pprint result) (t/is (= result expected)))))) - ;; duplicate shape: duplicate inside group (t/deftest duplicate-shapes-test2 (let [initial {:pages-by-id {1 {:id 1 :shapes [1]}} @@ -44,7 +44,7 @@ (assoc-in [:shapes-by-id 1 :items] [2 3 4 5]) (assoc-in [:shapes-by-id 4] {:id 4 :page 1 :group 1}) (assoc-in [:shapes-by-id 5] {:id 5 :page 1 :group 1}))] - (with-redefs [cljs.core/random-uuid (constantly-inc 4)] + (with-redefs [uuid.core/random (constantly-inc 4)] (let [result (ssh/duplicate-shapes initial [2 3])] ;; (pprint expected) ;; (pprint result) @@ -65,7 +65,7 @@ (assoc-in [:pages-by-id 1 :shapes] [1 4 5 6]) (assoc-in [:shapes-by-id 5] {:id 5 :page 1}) (assoc-in [:shapes-by-id 6] {:id 6 :page 1}))] - (with-redefs [cljs.core/random-uuid (constantly-inc 5)] + (with-redefs [uuid.core/random (constantly-inc 5)] (let [result (ssh/duplicate-shapes initial [3 4])] ;; (pprint expected) ;; (pprint result) @@ -86,7 +86,7 @@ :type :group :items [4]}) (assoc-in [:shapes-by-id 4] {:id 4 :page 1 :group 3}))] - (with-redefs [cljs.core/random-uuid (constantly-inc 3)] + (with-redefs [uuid.core/random (constantly-inc 3)] (let [result (ssh/duplicate-shapes initial [1])] ;; (pprint expected) ;; (pprint result)