mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +08:00
Add a unit test to test source-file target-dir /app/src/main/… (PR #542)
This commit is contained in:
parent
9f6c332b8c
commit
c0e9f25150
@ -70,6 +70,8 @@
|
||||
|
||||
<source-file src="src/android/DummyPlugin.java"
|
||||
target-dir="src/com/phonegap/plugins/dummyplugin" />
|
||||
<source-file src="src/android/DummyPlugin2.java"
|
||||
target-dir="app/src/main/src/com/phonegap/plugins/dummyplugin" />
|
||||
<lib-file src="src/android/TestLib.jar" />
|
||||
</platform>
|
||||
</plugin>
|
||||
|
1
spec/fixtures/org.test.plugins.dummyplugin/src/android/DummyPlugin2.java
vendored
Normal file
1
spec/fixtures/org.test.plugins.dummyplugin/src/android/DummyPlugin2.java
vendored
Normal file
@ -0,0 +1 @@
|
||||
./org.test.plugins.dummyplugin/src/android/DummyPlugin2.java
|
@ -108,6 +108,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 <framework> elements', function () {
|
||||
|
Loading…
Reference in New Issue
Block a user