mirror of
https://github.com/apache/cordova-android.git
synced 2026-01-30 00:05:28 +08:00
fix: display project name in Android Studio (#1214)
This commit is contained in:
@@ -132,7 +132,6 @@ describe('create', function () {
|
||||
spyOn(create, 'copyBuildRules');
|
||||
spyOn(create, 'writeProjectProperties');
|
||||
spyOn(create, 'prepBuildFiles');
|
||||
spyOn(create, 'writeNameForAndroidStudio');
|
||||
revert_manifest_mock = create.__set__('AndroidManifest', Manifest_mock);
|
||||
spyOn(fs, 'existsSync').and.returnValue(false);
|
||||
spyOn(fs, 'copySync');
|
||||
@@ -301,24 +300,4 @@ describe('create', function () {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('writeNameForAndroidStudio', () => {
|
||||
const project_path = path.join('some', 'path');
|
||||
const appName = 'Test Cordova';
|
||||
|
||||
beforeEach(function () {
|
||||
spyOn(fs, 'ensureDirSync');
|
||||
spyOn(fs, 'writeFileSync');
|
||||
});
|
||||
|
||||
it('should call ensureDirSync with path', () => {
|
||||
create.writeNameForAndroidStudio(project_path, appName);
|
||||
expect(fs.ensureDirSync).toHaveBeenCalledWith(path.join(project_path, '.idea'));
|
||||
});
|
||||
|
||||
it('should call writeFileSync with content', () => {
|
||||
create.writeNameForAndroidStudio(project_path, appName);
|
||||
expect(fs.writeFileSync).toHaveBeenCalledWith(path.join(project_path, '.idea', '.name'), appName);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user