diff options
author | basyura <basyura@gmail.com> | 2016-11-25 23:09:50 +0900 |
---|---|---|
committer | basyura <basyura@gmail.com> | 2016-12-05 22:02:45 +0900 |
commit | 3ce2ba1afb1dad707e1e3ac2bb5ff856d06f621e (patch) | |
tree | 5e02c245c190a0110834a9ea4c7d540ce0aef9d5 /spec/javascripts/merge_request_widget_spec.js | |
parent | 024ca242b4cdb6f64abb0148952796967d13104b (diff) | |
download | gitlab-ce-3ce2ba1afb1dad707e1e3ac2bb5ff856d06f621e.tar.gz |
fix display hook error message
Diffstat (limited to 'spec/javascripts/merge_request_widget_spec.js')
-rw-r--r-- | spec/javascripts/merge_request_widget_spec.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/javascripts/merge_request_widget_spec.js b/spec/javascripts/merge_request_widget_spec.js index 62890f1ca96..6f91529db00 100644 --- a/spec/javascripts/merge_request_widget_spec.js +++ b/spec/javascripts/merge_request_widget_spec.js @@ -106,6 +106,18 @@ }); }); + describe('mergeInProgress', function() { + it('should display error with h4 tag', function() { + spyOn(this.class.$widgetBody, 'html').and.callFake(function(html) { + expect(html).toBe('<h4>Sorry, something went wrong.</h4>'); + }); + spyOn($, 'ajax').and.callFake(function(e) { + e.success({ merge_error: 'Sorry, something went wrong.' }); + }); + this.class.mergeInProgress(null); + }); + }); + return describe('getCIStatus', function() { beforeEach(function() { this.ciStatusData = { |