Fixed the issue of renaming the database by another user. Fixes #4203

This commit is contained in:
Rahul Shirsat
2021-05-31 12:41:09 +05:30
committed by Akshay Joshi
parent a487a51135
commit 658a2de619
16 changed files with 645 additions and 478 deletions

View File

@@ -25,6 +25,7 @@ describe('#callRenderAfterPoll', () => {
disable_transaction_buttons: jasmine.createSpy('SQLEditor.disable_transaction_buttons'),
reset_data_store: jasmine.createSpy('SQLEditor.reset_data_store'),
enable_disable_download_btn: jasmine.createSpy('SQLEditor.enable_disable_download_btn'),
check_db_name_change: jasmine.createSpy('SQLEditor.check_db_name_change'),
query_start_time: new Date(),
};
alertify = jasmine.createSpyObj('alertify', ['success']);
@@ -229,6 +230,14 @@ describe('#callRenderAfterPoll', () => {
expect(sqlEditorSpy.trigger).toHaveBeenCalledWith('pgadmin-sqleditor:loading-icon:hide');
});
it('check whether database has been moved/renamed', () => {
callRenderAfterPoll(sqlEditorSpy, alertify, queryResult);
expect(sqlEditorSpy.trigger).toHaveBeenCalledWith('pgadmin-sqleditor:check_synchronous_db_name_change', queryResult);
expect(sqlEditorSpy.trigger).toHaveBeenCalledWith('pgadmin-sqleditor:loading-icon:hide');
});
});
});
});