mirror of
https://github.com/heyarne/airsonic-ui.git
synced 2026-05-06 18:33:38 +02:00
Make login-flow more robust and add more tests
This commit is contained in:
parent
84450479ae
commit
852a3193ab
9 changed files with 123 additions and 65 deletions
|
|
@ -47,3 +47,11 @@
|
|||
(api/unwrap-response error-response)
|
||||
(catch ExceptionInfo e
|
||||
(= (:error error-response) (ex-data e)))))))
|
||||
|
||||
(deftest error-recognition
|
||||
(testing "Should detect error responses"
|
||||
(is (true? (api/is-error? (:error responses))))
|
||||
(is (true? (api/is-error? (:auth-failure responses)))))
|
||||
(testing "Should pass on good responses"
|
||||
(is (false? (api/is-error? (:ok responses))))
|
||||
(is (false? (api/is-error? (:auth-success responses))))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue