FROM THIS: describe('.setCurrentUser', function (){ it('creates message types for the user', function (){ yam.setCurrentUser({ id: 1 , attachments: [ { app_id: 'praise', name: 'foo' } , { app_id: 'polls', name: 'bar' } , { app_id: 'notonwhitelist', name: 'baz' } ] }); var messageTypes = yam.getCurrentUser().getMessageTypes(); expect(messageTypes.length).to(be, 3); var ids = _.map(messageTypes, function (mt){ return mt.app_id; }).sort(); expect(ids).to(equal, ['polls', 'praise', 'update']); }); }); TO THIS: describe('.setCurrentUser', function (){ it('creates message types for the user', function (){ yam.setCurrentUser({ id: 1 , attachments: [ { app_id: 'praise', name: 'foo' } , { app_id: 'polls', name: 'bar' } , { app_id: 'notonwhitelist', name: 'baz' } ] , publisher_options: [ { app_id: 'praise', name: 'foo' } , { app_id: 'polls', name: 'bar' } , { app_id: 'notonwhitelist', name: 'baz' } ] }); var messageTypes = yam.getCurrentUser().getMessageTypes(); expect(messageTypes.length).to(be, 3); var ids = _.map(messageTypes, function (mt){ return mt.app_id; }).sort(); expect(ids).to(equal, ['polls', 'praise', 'update']); }); });