From b39df5ea872e17080b742813c73fe22326237277 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 14 Aug 2013 21:49:13 +0800 Subject: [PATCH] Use Menu.buildFromTemplate instead of raw menu APIs. --- spec/api/menu.coffee | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/spec/api/menu.coffee b/spec/api/menu.coffee index c0551a699880..a2b8f28292d5 100644 --- a/spec/api/menu.coffee +++ b/spec/api/menu.coffee @@ -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