mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed the issue of renaming the database by another user. Fixes #4203
This commit is contained in:
committed by
Akshay Joshi
parent
a487a51135
commit
658a2de619
@@ -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');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user