Repository: cordova-plugin-file-transfer
Updated Branches:
  refs/heads/master 65d28795a -> 4dc697a86


CB-9843 Added wp8 quirk to test spec 12

github: close #106


Project: 
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/commit/4dc697a8
Tree: 
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/tree/4dc697a8
Diff: 
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/diff/4dc697a8

Branch: refs/heads/master
Commit: 4dc697a8636bc0541b2fe99f136ce9aa39cbe970
Parents: 65d2879
Author: Alexander Sorokin <[email protected]>
Authored: Tue Oct 27 13:51:47 2015 +0300
Committer: daserge <[email protected]>
Committed: Tue Oct 27 20:32:04 2015 +0300

----------------------------------------------------------------------
 tests/tests.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/4dc697a8/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index 958327f..fd6f09e 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -49,6 +49,7 @@ exports.defineAutoTests = function () {
 
     var isBrowser = cordova.platformId === 'browser';
     var isIE = isBrowser && navigator.userAgent.indexOf('Trident') >= 0;
+    var isWp8 = cordova.platformId === "windowsphone";
 
     describe('FileTransferError', function () {
 
@@ -504,7 +505,13 @@ exports.defineAutoTests = function () {
 
                         expect(error.http_status).not.toBe(401, "Ensure " + 
fileURL + " is in the white list");
                         expect(error.http_status).toBe(404);
-                        
expect(error.code).toBe(FileTransferError.FILE_NOT_FOUND_ERR);
+
+                        // wp8 does not make difference between 404 and 
unknown host
+                        if (isWp8) {
+                            
expect(error.code).toBe(FileTransferError.CONNECTION_ERR);
+                        } else {
+                            
expect(error.code).toBe(FileTransferError.FILE_NOT_FOUND_ERR);
+                        }
 
                         done();
                     };


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to