git ssb

0+

Piet / ssb-loomio



Commit 11d77c5543a6ea0a4c142559d79096b5db3bd0e1

Adds tests for chooseOne

Piet Geursen committed on 2/26/2018, 3:10:57 AM
Parent: f4dab21d95cabd1f4db3906fa99ea971a8672620

Files changed

test/schema/pollTypes/chooseOne.jschanged
test/schema/pollTypes/chooseOne.jsView
@@ -1,6 +1,14 @@
11 var test = require('tape')
2 +var {create, validate} = require('../../../schema/pollTypes/chooseOne');
23
3-test('ok', function(t) {
4- t.pass()
4 +test('create and validate an invalid chooseOne poll', function(t) {
5 + var myPoll = create({choices:"how"})
6 + t.false(validate(myPoll))
57 t.end()
68 })
9 +
10 +test('create and validate a valid chooseOne poll', function(t) {
11 + var myPoll = create({choices:["how","many", "food"]})
12 + t.true(validate(myPoll))
13 + t.end()
14 +})

Built with git-ssb-web