import $ from 'jquery'
import init from '../init'

describe('SaveInfo组件', () => {
  let vm = null
  before(()=> {
    init()
    vm = Util.createTest('save-info', {})
  })

  after(function () {
    Util.destroyVM(vm)
  })

  it('SaveInfo组件能够正确显示', () => {
    expect($(vm.$el).html()).to.contain('保存')
  })
  it('提交', done => {
    vm.itemId = '1'
    vm.model.f_itemname = '测试内容'
    vm.$nextTick(() => {
      vm.save()
      done()
    })
  })
})
