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:
parent
504ab841d5
commit
a175fb3d34
6 changed files with 65 additions and 24 deletions
|
|
@ -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})
|
||||
|
|
|
|||
16
test/cljs/airsonic_ui/subs_test.cljs
Normal file
16
test/cljs/airsonic_ui/subs_test.cljs
Normal 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]))))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue