From d7c383a0ee2ec71e5ef941ccec1de0aaf1ecc8b6 Mon Sep 17 00:00:00 2001 From: "Luke \"Jared\" Bennett" Date: Tue, 4 Jul 2017 14:41:26 +0100 Subject: Fixed MR single button submit failure and attempted to tidy up close_reopen partials using issuable_helpers and setDisable will use true as default bool --- spec/javascripts/close_reopen_report_toggle_spec.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'spec/javascripts') diff --git a/spec/javascripts/close_reopen_report_toggle_spec.js b/spec/javascripts/close_reopen_report_toggle_spec.js index d94f6a8a345..925e959c85a 100644 --- a/spec/javascripts/close_reopen_report_toggle_spec.js +++ b/spec/javascripts/close_reopen_report_toggle_spec.js @@ -198,6 +198,13 @@ describe('CloseReopenReportToggle', () => { expect(dropdownTrigger.setAttribute).toHaveBeenCalledWith('disabled', 'true'); }); + it('disable .button and .dropdownTrigger if shouldDisable is undefined', () => { + closeReopenReportToggle.setDisable(); + + expect(button.setAttribute).toHaveBeenCalledWith('disabled', 'true'); + expect(dropdownTrigger.setAttribute).toHaveBeenCalledWith('disabled', 'true'); + }); + it('enable .button and .dropdownTrigger if shouldDisable is false', () => { closeReopenReportToggle.setDisable(false); -- cgit v1.2.1