Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-02 15:08:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-02 15:08:33 +0300
commit810bd2a662abaa60663ec19bcb55f883d329eb07 (patch)
tree9c0e537d8a23ac4481f13420fd9e0772dc3abf10 /spec/javascripts
parent8c826685ecb0058bf6acaf960ecab7897932f2e2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/merge_request_tabs_spec.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/javascripts/merge_request_tabs_spec.js b/spec/javascripts/merge_request_tabs_spec.js
index cbb61333d77..2b5fde9532d 100644
--- a/spec/javascripts/merge_request_tabs_spec.js
+++ b/spec/javascripts/merge_request_tabs_spec.js
@@ -30,7 +30,7 @@ describe('MergeRequestTabs', function() {
setLocation();
this.spies = {
- history: spyOn(window.history, 'replaceState').and.callFake(function() {}),
+ history: spyOn(window.history, 'pushState').and.callFake(function() {}),
};
});
@@ -142,6 +142,7 @@ describe('MergeRequestTabs', function() {
afterEach(() => {
mock.restore();
+ window.history.replaceState({}, '', '/');
});
it('changes from commits', function() {
@@ -194,11 +195,21 @@ describe('MergeRequestTabs', function() {
setLocation({
pathname: '/foo/bar/-/merge_requests/1',
});
+ window.history.replaceState(
+ {
+ url: window.location.href,
+ action: 'show',
+ },
+ document.title,
+ window.location.href,
+ );
+
const newState = this.subject('commits');
expect(this.spies.history).toHaveBeenCalledWith(
{
url: newState,
+ action: 'commits',
},
document.title,
newState,