From 153531fff3c8f32482035bfa87fee2161171e698 Mon Sep 17 00:00:00 2001 From: "Luke \"Jared\" Bennett" Date: Fri, 7 Apr 2017 00:56:46 +0100 Subject: Finish up feature spec --- spec/javascripts/droplab/plugins/input_setter.js | 36 +----------------------- 1 file changed, 1 insertion(+), 35 deletions(-) (limited to 'spec/javascripts') diff --git a/spec/javascripts/droplab/plugins/input_setter.js b/spec/javascripts/droplab/plugins/input_setter.js index c9b7b2b23dc..412d1054385 100644 --- a/spec/javascripts/droplab/plugins/input_setter.js +++ b/spec/javascripts/droplab/plugins/input_setter.js @@ -2,7 +2,7 @@ import InputSetter from '~/droplab/plugins/input_setter'; -describe('InputSetter', function () { +fdescribe('InputSetter', function () { describe('init', function () { beforeEach(function () { this.config = { InputSetter: {} }; @@ -140,22 +140,6 @@ describe('InputSetter', function () { expect(this.input.value).toBe(this.newValue); }); - describe('if there is no newValue', function () { - beforeEach(function () { - this.newValue = ''; - this.inputSetter = { hook: { trigger: {} } }; - this.config = { valueAttribute: {}, input: this.input }; - this.input = { value: 'oldValue', tagName: 'INPUT' }; - this.selectedItem = { getAttribute: () => {} }; - - InputSetter.setInput.call(this.inputSetter, this.config, this.selectedItem); - }); - - it('should not set the value of the input', function () { - expect(this.input.value).toBe('oldValue'); - }) - }); - describe('if no config.input is provided', function () { beforeEach(function () { this.config = { valueAttribute: {} }; @@ -181,24 +165,6 @@ describe('InputSetter', function () { it('should set the textContent of the input', function () { expect(this.input.textContent).toBe(this.newValue); }); - - describe('if there is no new value', function () { - beforeEach(function () { - this.selectedItem = { getAttribute: () => {} }; - this.input = { textContent: 'oldValue', tagName: 'INPUT', hasAttribute: () => {} }; - this.config = { valueAttribute: {}, input: this.input }; - this.inputSetter = { hook: { trigger: {} } }; - this.newValue = 'newValue'; - - spyOn(this.selectedItem, 'getAttribute').and.returnValue(this.newValue); - - InputSetter.setInput.call(this.inputSetter, this.config, this.selectedItem); - }); - - it('should not set the value of the input', function () { - expect(this.input.textContent).toBe('oldValue'); - }); - }); }); describe('if there is an inputAttribute', function () { -- cgit v1.2.3