Add spec for attaching extra fields to menu items.

This commit is contained in:
Cheng Zhao 2013-08-14 12:04:16 +08:00
parent d4a148ea52
commit 114d247efb

9
spec/api/menu.coffee Normal file
View file

@ -0,0 +1,9 @@
assert= require 'assert'
remote = require 'remote'
Menu = remote.require 'menu'
describe 'Menu API', ->
describe 'Menu.buildFromTemplate', ->
it 'should be able to attach extra fields', ->
menu = Menu.buildFromTemplate [label: 'text', extra: 'field']
assert.equal menu.items[0].extra, 'field'