From fb1dfb27df1f61aedcb497d872d336e582fc301f Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Sun, 11 Nov 2018 13:36:31 -0500 Subject: [PATCH] unit test uninstall of with app dest for Java source only (GH-539) Co-Authored-By: Christopher J. Brody Co-Authored-By: Kyle Kirbatski --- spec/unit/pluginHandlers/handlers.spec.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/spec/unit/pluginHandlers/handlers.spec.js b/spec/unit/pluginHandlers/handlers.spec.js index 1e2f1ea8..48303b48 100644 --- a/spec/unit/pluginHandlers/handlers.spec.js +++ b/spec/unit/pluginHandlers/handlers.spec.js @@ -257,6 +257,10 @@ describe('android project handler', function () { }); }); + // TODO: + // - merge tests of elements into single describe block + // (with proper beforeEach/afterEach) + // - renumber the tests after Test#019 describe('of elements', function () { it('Test#019 : should remove stuff by calling common.deleteJava for Android Studio projects', function () { android['source-file'].install(valid_source[0], dummyPluginInfo, dummyProject); @@ -265,6 +269,14 @@ describe('android project handler', function () { }); }); + describe('of element, with specific app target-dir', function () { + it('Test#019a : should remove stuff by calling common.deleteJava for Android Studio projects, with specific app target-dir', function () { + android['source-file'].install(valid_source[1], dummyPluginInfo, dummyProject, {android_studio: true}); + android['source-file'].uninstall(valid_source[1], dummyPluginInfo, dummyProject, {android_studio: true}); + expect(deleteJavaSpy).toHaveBeenCalledWith(temp, path.join('app/src/main/src/com/phonegap/plugins/dummyplugin/DummyPlugin2.java')); + }); + }); + describe('of elements', function () { var someString = jasmine.any(String);