1
0
Fork 0
mirror of https://github.com/heyarne/airsonic-ui.git synced 2026-05-07 02:33:39 +02:00

Make sortable component more reusable

This commit is contained in:
heyarne 2019-03-04 14:13:07 +01:00
commit c715e5025c
4 changed files with 98 additions and 82 deletions

View file

@ -43,3 +43,9 @@
(is (= "59:00" (helpers/format-duration (* 59 60) :brief? true)))
(is (= "01:00" (helpers/format-duration 60 :brief? true)))
(is (= "00:05" (helpers/format-duration 5 :brief? true)))))
(deftest vector-move
(testing "Should correctly move items in a vector"
(is (= [1] (helpers/vector-move [1] 0 0)))
(is (= [2 1] (helpers/vector-move [1 2] 0 1) (helpers/vector-move [1 2] 1 0)))
(is (= [1 4 2 3 5] (helpers/vector-move [1 2 3 4 5] 3 1)))))