unit test uninstall of <source-file> with app dest

for Java source only (GH-539)

Co-Authored-By: Christopher J. Brody <chris.brody@gmail.com>
Co-Authored-By: Kyle Kirbatski <kkirbatski@gmrmarketing.com>
This commit is contained in:
Christopher J. Brody 2018-11-11 13:36:31 -05:00
parent 898a6a8d8d
commit fb1dfb27df

View File

@ -257,6 +257,10 @@ describe('android project handler', function () {
}); });
}); });
// TODO:
// - merge tests of <source-file> elements into single describe block
// (with proper beforeEach/afterEach)
// - renumber the tests after Test#019
describe('of <source-file> elements', function () { describe('of <source-file> elements', function () {
it('Test#019 : should remove stuff by calling common.deleteJava for Android Studio projects', 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); android['source-file'].install(valid_source[0], dummyPluginInfo, dummyProject);
@ -265,6 +269,14 @@ describe('android project handler', function () {
}); });
}); });
describe('of <source-file> 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 <framework> elements', function () { describe('of <framework> elements', function () {
var someString = jasmine.any(String); var someString = jasmine.any(String);