[client action] add a test to prove 21b2176
This commit is contained in:
@ -264,7 +264,7 @@ describe('Client Action runner', function () {
|
||||
beforeEach(function () {
|
||||
action = makeClientAction({
|
||||
params: {
|
||||
one: { type: 'enum', options: ['opt', 'other opt', '150'] }
|
||||
one: { type: 'enum', options: ['opt', 'other opt', '150', 'true'] }
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -289,6 +289,16 @@ describe('Client Action runner', function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('accepts string versions of booleans', function (done) {
|
||||
action({
|
||||
one: true
|
||||
}, function (err, params) {
|
||||
if (err) { throw err; }
|
||||
expect(params.query.one).to.be('true');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('it rejects things not in the list', function (done) {
|
||||
action({
|
||||
one: 'not an opt'
|
||||
|
||||
Reference in New Issue
Block a user