message: added unbind non-existant field test
diff: @@ -6,7 +6,7 @@ import InjectComponent from './components/Inject';
  import ChildInject from './components/stubs/ChildWithParentValidatorInjection';
  import ChildNew from './components/stubs/ChildWithNewValidatorInjection';
  -test('warns if no validator instance was found in the directive context on bind', () => {
  +test('bind: warns if no validator instance was found in the directive context', () => {
  global.console.warn = jest.fn();
  const Vue = createLocalVue();
  Vue.directive('validate', VeeValidate.directive);
  @@ -14,7 +14,20 @@ test('warns if no validator instance was found in the directive context on bind'
  expect(global.console.warn).toHaveBeenCalled();
  });
  -test('the validator instance is destroyed when the owning component is destroyed', () => {
  +test('unbind: does not detach the field if it does not exist', () => {
  + const Vue = createLocalVue();
  + Vue.use(VeeValidate);
  + const wrapper = shallow(BasicComponent, { localVue: Vue });
  + const validator = wrapper.vm.$validator;
  + const detach = validator.detach.bind(validator);
  + validator.detach = jest.fn(detach);
  + validator.fields.items[0].id = 'jadja'; // mess up the id.
  + wrapper.destroy();
  + expect(validator.detach).not.toHaveBeenCalled();
  +});
  +
  +test('destroy: the validator instance is destroyed when the owning component is destroyed', () => {
  + VeeValidate.uninstall();
  const Vue = createLocalVue();
  Vue.use(VeeValidate);
  @@ -24,9 +37,7 @@ test('the validator instance is destroyed when the owning component is destroyed
  const validator = wrapper.vm.$validator;
  const destroy = validator.destroy.bind(validator);
  - validator.destroy = jest.fn(() => {
  - destroy();
  - });
  + validator.destroy = jest.fn(destroy);
  childWithParentValidator.destroy();
  expect(validator.destroy).not.toHaveBeenCalled();
  