diff --git a/spec/fixtures/org.test.plugins.dummyplugin/plugin.xml b/spec/fixtures/org.test.plugins.dummyplugin/plugin.xml index 5cd28720..f4ae82be 100644 --- a/spec/fixtures/org.test.plugins.dummyplugin/plugin.xml +++ b/spec/fixtures/org.test.plugins.dummyplugin/plugin.xml @@ -77,6 +77,7 @@ + diff --git a/spec/fixtures/org.test.plugins.dummyplugin/src/android/other.extension b/spec/fixtures/org.test.plugins.dummyplugin/src/android/other.extension new file mode 100644 index 00000000..421376db --- /dev/null +++ b/spec/fixtures/org.test.plugins.dummyplugin/src/android/other.extension @@ -0,0 +1 @@ +dummy diff --git a/spec/unit/pluginHandlers/handlers.spec.js b/spec/unit/pluginHandlers/handlers.spec.js index 1c5b2245..abac7299 100644 --- a/spec/unit/pluginHandlers/handlers.spec.js +++ b/spec/unit/pluginHandlers/handlers.spec.js @@ -128,6 +128,13 @@ describe('android project handler', function () { 'src/android/mysettings.xml', temp, path.join('app/src/main/res/xml/mysettings.xml'), false); }); + + it('Test#006e : should allow installing file with other extension from sources with old target-dir scheme', function () { + android['source-file'].install(valid_source[5], dummyPluginInfo, dummyProject, {android_studio: true}); + expect(copyFileSpy).toHaveBeenCalledWith(dummyplugin, + 'src/android/other.extension', temp, + path.join('app/src/main/res/values/other.extension'), false); + }); }); describe('of elements', function () { @@ -307,6 +314,12 @@ describe('android project handler', function () { android['source-file'].uninstall(valid_source[4], dummyPluginInfo, dummyProject, {android_studio: true}); expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('app/src/main/res/xml/mysettings.xml')); }); + + it('Test#019e : should remove stuff by calling common.removeFile for Android Studio projects, of file with other extension with old target-dir scheme', function () { + android['source-file'].install(valid_source[5], dummyPluginInfo, dummyProject, {android_studio: true}); + android['source-file'].uninstall(valid_source[5], dummyPluginInfo, dummyProject, {android_studio: true}); + expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('app/src/main/res/values/other.extension')); + }); }); describe('of elements', function () {