From 114d247efb026ad6264c8fa21c618c7382846267 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 14 Aug 2013 12:04:16 +0800 Subject: [PATCH] Add spec for attaching extra fields to menu items. --- spec/api/menu.coffee | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 spec/api/menu.coffee diff --git a/spec/api/menu.coffee b/spec/api/menu.coffee new file mode 100644 index 000000000000..396a41f92b3e --- /dev/null +++ b/spec/api/menu.coffee @@ -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'