cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mura...@apache.org
Subject cordova-lib git commit: CB-9278: Tests to prevent future regressions while restoring multiple platforms. This closes #276
Date Tue, 04 Aug 2015 17:55:23 GMT
Repository: cordova-lib
Updated Branches:
  refs/heads/master 71602d961 -> 2edf1df74


CB-9278: Tests to prevent future regressions while restoring multiple platforms. This closes
#276


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/2edf1df7
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/2edf1df7
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/2edf1df7

Branch: refs/heads/master
Commit: 2edf1df741b844f6cc4e6e65cd804c4cb07b0665
Parents: 71602d9
Author: Omar Mefire <omefire@gmail.com>
Authored: Mon Aug 3 17:37:04 2015 -0700
Committer: Murat Sutunc <sutunc@gmail.com>
Committed: Tue Aug 4 10:54:03 2015 -0700

----------------------------------------------------------------------
 cordova-lib/spec-cordova/save.spec.js | 39 ++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/2edf1df7/cordova-lib/spec-cordova/save.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/save.spec.js b/cordova-lib/spec-cordova/save.spec.js
index a04dc4b..3847b7d 100644
--- a/cordova-lib/spec-cordova/save.spec.js
+++ b/cordova-lib/spec-cordova/save.spec.js
@@ -471,6 +471,45 @@ describe('(save flag)', function () {
                 done();
             });
         });
+
+	it('spec.25 should restore multiple specified platforms', function(done) {
+	    var iosPlatformName = 'ios';
+	    var iosPlatformSpec = '3.8.0';
+	    helpers.setEngineSpec(appPath, platformName, platformGitRef);
+	    helpers.setEngineSpec(appPath, iosPlatformName, iosPlatformSpec);
+	    var options = {
+	        verbose: false,
+	        platforms: [platformName, iosPlatformName],
+	        options: []
+	    };
+	    prepare(options)
+	        .then(function() {
+	            expect(path.join(appPath, 'platforms', platformName)).toExist();
+	            expect(path.join(appPath, 'platforms', iosPlatformName)).toExist();
+	            done();
+	        }).catch(function(err) {
+	            expect(true).toBe(false);
+	            console.log(err.message);
+	            done();
+	        });
+	});
+
+	it('spec.26: proceed with restoration even if some of the platforms fail to be restored',
function(done) {
+	    var iosPlatformName = 'ios';
+	    helpers.setEngineSpec(appPath, platformName, platformGitRef);
+	    helpers.setEngineSpec(appPath, iosPlatformName, 'WrongVersion');
+	    var options = {
+	        verbose: false,
+	        platforms: [iosPlatformName, platformName],
+	        options: []
+	    };
+	    prepare(options)
+	        .finally(function() {
+	            expect(path.join(appPath, 'platforms', platformName)).toExist();
+		    expect(path.join(appPath, 'platforms', iosPlatformName)).not.toExist();
+	            done();
+	        });
+	});
     });
 
     describe('(cleanup)', function () {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message