浏览代码

add test for boolean attributes

rhyzx 10 年之前
父节点
当前提交
1fb8d5c27f
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      test/unit/specs/directives/public/bind_spec.js

+ 2 - 0
test/unit/specs/directives/public/bind_spec.js

@@ -24,6 +24,8 @@ describe('v-bind', function () {
     expect(el.hasAttribute('test')).toBe(false)
     dir.update(false)
     expect(el.hasAttribute('test')).toBe(false)
+    dir.update(true)
+    expect(el.getAttribute('test')).toBe('')
     dir.update(0)
     expect(el.getAttribute('test')).toBe('0')
   })