summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-11-18 23:02:09 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2016-11-18 23:02:09 +0100
commitd2007ee6ddaf665170bac0ed63fc1a3ab92b04db (patch)
treece37b50d363573dbe20a42b14758dd3cb5b3f5b0
parent3176e298308f16acca50fc7c127f84e0dc3678ad (diff)
downloadgitlab-ce-d2007ee6ddaf665170bac0ed63fc1a3ab92b04db.tar.gz
Try to fix tests
-rw-r--r--spec/javascripts/environments/environment_stop_spec.js.es69
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/javascripts/environments/environment_stop_spec.js.es6 b/spec/javascripts/environments/environment_stop_spec.js.es6
index 20eb8c92322..d3eff278292 100644
--- a/spec/javascripts/environments/environment_stop_spec.js.es6
+++ b/spec/javascripts/environments/environment_stop_spec.js.es6
@@ -7,14 +7,14 @@ describe('Stop Component', () => {
});
it('should link to the provided URL', () => {
- const stopURL = 'https://gitlab.com/stop';
+ const stopURL = '/stop';
const component = new window.gl.environmentsList.StopComponent({
el: document.querySelector('.test-dom-element'),
propsData: {
stop_url: stopURL,
},
});
- expect(component.$el.getAttribute('href')).toEqual(`${stopURL}/stop`);
+ expect(component.$el.getAttribute('href')).toEqual(stopURL);
});
describe('When clicked', () => {
@@ -26,9 +26,10 @@ describe('Stop Component', () => {
},
});
- const spy = spyOn(window, 'confirm');
+ var confirm = spyOn(window, 'confirm');
+ confirm.and.returnValue(false);
component.$el.click();
- expect(spy).toHaveBeenCalled();
+ expect(confirm).toHaveBeenCalled();
});
});
});