summaryrefslogtreecommitdiff
path: root/spec/javascripts/lib
diff options
context:
space:
mode:
author🌴🌴 Filipa Lacerda - OOO back on September 17th 🌴🌴 <filipa@gitlab.com>2018-09-03 07:49:52 +0000
committerPhil Hughes <me@iamphill.com>2018-09-03 07:49:52 +0000
commit55582b4359a4c46b5cbb4fa60d93ca92cc947063 (patch)
tree1dc83ec5bba15d99ea5909eb1571c5ef99ef9fae /spec/javascripts/lib
parente550b1abaaa9b0053d3430377938f1e801c1fbb1 (diff)
downloadgitlab-ce-55582b4359a4c46b5cbb4fa60d93ca92cc947063.tar.gz
Adds Vuex store for the job log page
Diffstat (limited to 'spec/javascripts/lib')
-rw-r--r--spec/javascripts/lib/utils/common_utils_spec.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/spec/javascripts/lib/utils/common_utils_spec.js b/spec/javascripts/lib/utils/common_utils_spec.js
index 71b26a315af..babad296f09 100644
--- a/spec/javascripts/lib/utils/common_utils_spec.js
+++ b/spec/javascripts/lib/utils/common_utils_spec.js
@@ -403,6 +403,7 @@ describe('common_utils', () => {
afterEach(() => {
document.body.removeChild(document.getElementById('favicon'));
});
+
it('should set page favicon to provided favicon', () => {
const faviconPath = '//custom_favicon';
commonUtils.setFavicon(faviconPath);
@@ -479,17 +480,14 @@ describe('common_utils', () => {
});
it('should reset favicon in case of error', (done) => {
- mock.onGet(BUILD_URL).networkError();
+ mock.onGet(BUILD_URL).replyOnce(500);
commonUtils.setCiStatusFavicon(BUILD_URL)
- .then(() => {
+ .catch(() => {
const favicon = document.getElementById('favicon');
expect(favicon.getAttribute('href')).toEqual(faviconDataUrl);
done();
- })
- // Error is already caught in catch() block of setCiStatusFavicon,
- // It won't throw another error for us to catch
- .catch(done.fail);
+ });
});
it('should set page favicon to CI status favicon based on provided status', (done) => {