Add spec for attaching extra fields to menu items.
This commit is contained in:
parent
d4a148ea52
commit
114d247efb
1 changed files with 9 additions and 0 deletions
9
spec/api/menu.coffee
Normal file
9
spec/api/menu.coffee
Normal 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'
|
Loading…
Reference in a new issue