diff --git a/spec/fixtures/org.test.plugins.dummyplugin/plugin.xml b/spec/fixtures/org.test.plugins.dummyplugin/plugin.xml index a40df2b2..5451ef8d 100644 --- a/spec/fixtures/org.test.plugins.dummyplugin/plugin.xml +++ b/spec/fixtures/org.test.plugins.dummyplugin/plugin.xml @@ -70,6 +70,8 @@ + diff --git a/spec/fixtures/org.test.plugins.dummyplugin/src/android/DummyPlugin2.java b/spec/fixtures/org.test.plugins.dummyplugin/src/android/DummyPlugin2.java new file mode 100644 index 00000000..c2dd0f73 --- /dev/null +++ b/spec/fixtures/org.test.plugins.dummyplugin/src/android/DummyPlugin2.java @@ -0,0 +1 @@ +./org.test.plugins.dummyplugin/src/android/DummyPlugin2.java diff --git a/spec/unit/pluginHandlers/handlers.spec.js b/spec/unit/pluginHandlers/handlers.spec.js index cc6a39dd..1e2f1ea8 100644 --- a/spec/unit/pluginHandlers/handlers.spec.js +++ b/spec/unit/pluginHandlers/handlers.spec.js @@ -102,6 +102,12 @@ describe('android project handler', function () { android['source-file'].install(valid_source[0], dummyPluginInfo, dummyProject); }).toThrow(new Error('"' + target + '" already exists!')); }); + + it('Test#007 : should allow installing sources using proper path', function () { + android['source-file'].install(valid_source[1], dummyPluginInfo, dummyProject, {android_studio: true}); + expect(copyFileSpy) + .toHaveBeenCalledWith(dummyplugin, 'src/android/DummyPlugin2.java', temp, path.join('app/src/main/src/com/phonegap/plugins/dummyplugin/DummyPlugin2.java'), false); + }); }); describe('of elements', function () {