Skip to content

Commit

Permalink
Use Menu.buildFromTemplate instead of raw menu APIs.
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz committed Aug 14, 2013
1 parent 5189caa commit b39df5e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions spec/api/menu.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ describe 'Menu API', ->

describe 'MenuItem.click', ->
it 'should be called with the item object passed', (done) ->
menu = new Menu
menuItem = new MenuItem
menu = Menu.buildFromTemplate [
label: 'text'
click: (item) ->
assert.equal item.constructor.name, 'MenuItem'
assert.equal item.label, 'text'
done()
menu.append menuItem
menu.delegate.executeCommand menuItem.commandId
]
menu.delegate.executeCommand menu.items[0].commandId

0 comments on commit b39df5e

Please sign in to comment.