Skip to content

Commit

Permalink
unit test uninstall of <source-file> with app dest (PR apache#542)
Browse files Browse the repository at this point in the history
for Java source only (apacheGH-539)

Co-Authored-By: Christopher J. Brody <chris.brody@gmail.com>
Co-Authored-By: Kyle Kirbatski <kkirbatski@gmrmarketing.com>
  • Loading branch information
Christopher J. Brody and kkirby committed Nov 16, 2018
1 parent c0e9f25 commit 55f2986
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/unit/pluginHandlers/handlers.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,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 () {
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_studio: true});
Expand All @@ -271,6 +275,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 () {

var someString = jasmine.any(String);
Expand Down

0 comments on commit 55f2986

Please sign in to comment.