Created
June 21, 2012 18:01
-
-
Save joelklabo/2967385 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment