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

Spring cleaning

* Remove unused subs
* Move cover urls into subscriptios
* Check if TODOs and FIXMEs are still up to date
This commit is contained in:
Arne Schlüter 2018-06-12 00:54:42 +02:00
commit a175fb3d34
6 changed files with 65 additions and 24 deletions

View file

@ -12,3 +12,26 @@
:version "1.15.0"}}
:auth-success {:subsonic-response {:status "ok"
:version "1.15.0"}}})
(def song
{:artistId 42,
:path "DJ Koze/DJ Koze - Reincarnations Part 2, The Remix Chapter 2009-2014/14. Apparat - Black Water (DJ Koze Remix).mp3",
:suffix "mp3",
:isDir false,
:bitRate 320,
:parent 3556,
:albumId 382,
:type "music",
:created "2017-06-28T19:07:02.000Z",
:duration 317,
:artist "Apparat",
:isVideo false,
:size 12850290,
:title "Black Water (DJ Koze Remix)",
:playCount 0
:year 2014,
:id 3562,
:coverArt 3556,
:contentType "audio/mpeg",
:album "Reincarnations, Pt. 2 - The Remix Chapter 2009 - 2014",
:track 14})

View file

@ -0,0 +1,16 @@
(ns airsonic-ui.subs-test
(:require [cljs.test :refer [deftest testing is]]
[airsonic-ui.fixtures :refer [song]]
[airsonic-ui.utils.api :as api]
[airsonic-ui.subs :as subs]))
(deftest cover-images
(let [credentials {:server "https://foo.bar"
:u "test-user"
:p "some-random-password"}]
(testing "Should give the correct path once the credentials are set"
(is (= (api/cover-url (:server credentials)
(select-keys credentials [:u :p])
song
48)
(subs/cover-url [credentials] [:_ song 48]))))))