summary history branches tags files
commit:7310fd9602f7ac37c170094447d525a98599bb30
author:Trevor Bentley
committer:Trevor Bentley
date:Wed Aug 2 11:19:01 2017 +0200
parents:6ce033f166d674e5ec20b4fba8ca8aabfc644655
Update test case for new optional API
diff --git a/src/webapi/test.rs b/src/webapi/test.rs
line changes: +3/-3
index 98ee19c..e47360c
--- a/src/webapi/test.rs
+++ b/src/webapi/test.rs
@@ -124,7 +124,7 @@ mod tests {
 
     #[test]
     fn test_refresh_oauth_tokens_no_connection() {
-        let spotify = SpotifyConnectr::new().with_api(TEST_API);
+        let spotify = SpotifyConnectr::new().unwrap().with_api(TEST_API);
         let res = spotify.refresh_oauth_tokens();
         // Unlock webserver init so all other tests can run
         WEBSERVER_STARTED.store(true, Ordering::Relaxed);
@@ -134,7 +134,7 @@ mod tests {
     #[test]
     fn test_refresh_oauth_tokens_pass() {
         init();
-        let spotify = SpotifyConnectr::new().with_api(TEST_API);
+        let spotify = SpotifyConnectr::new().unwrap().with_api(TEST_API);
         match spotify.refresh_oauth_tokens() {
             Some((access,expires)) => {
                 assert_eq!(access, "valid_access_code");
@@ -147,7 +147,7 @@ mod tests {
     #[test]
     fn test_refresh_oauth_tokens_error_status() {
         init();
-        let mut spotify = SpotifyConnectr::new().with_api(TEST_API);
+        let mut spotify = SpotifyConnectr::new().unwrap().with_api(TEST_API);
         spotify.refresh_token = Some("error".to_string());
         match spotify.refresh_oauth_tokens() {
             Some(_) => { assert!(false) },