Fixed android two uninstall not removing directory
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/29a03846 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/29a03846 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/29a03846 Branch: refs/heads/master Commit: 29a03846daadba94fbd77b94a0bb5363d7d46490 Parents: 0a97dc3 Author: Tim Kim <[email protected]> Authored: Tue Apr 16 16:29:46 2013 -0700 Committer: Tim Kim <[email protected]> Committed: Tue Apr 16 16:29:46 2013 -0700 ---------------------------------------------------------------------- test/android-two-uninstall.js | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/29a03846/test/android-two-uninstall.js ---------------------------------------------------------------------- diff --git a/test/android-two-uninstall.js b/test/android-two-uninstall.js index 8781eba..4e6e6fc 100644 --- a/test/android-two-uninstall.js +++ b/test/android-two-uninstall.js @@ -28,7 +28,7 @@ var fs = require('fs') , shell = require('shelljs') , et = require('elementtree') , android = require(path.join(__dirname, '..', 'platforms', 'android')) - + , plugin_loader = require('../util/plugin_loader') , test_dir = path.join(osenv.tmpdir(), 'test_plugman') , test_project_dir = path.join(test_dir, 'projects', 'android_two') , test_plugin_dir = path.join(test_dir, 'plugins', 'ChildBrowser') @@ -69,9 +69,12 @@ exports['should remove the js file'] = function (test) { } exports['should remove the directory'] = function (test) { + var pluginsPath = path.join(test_dir, 'plugins'); + var wwwPath = path.join(test_dir, 'projects', 'android_two', 'assets', 'www'); var assetPath = path.join(test_dir, 'projects', 'android_two', 'assets', 'www', 'childbrowser'); android.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et); + plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'android'); test.ok(fs.existsSync(assetPath)); android.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
