Line | |
---|
1 | define([ |
---|
2 | "doh", |
---|
3 | "dojox/mvc/StatefulModel" |
---|
4 | ], function(doh, StatefulModel){ |
---|
5 | // Refers to: |
---|
6 | // http://bugs.dojotoolkit.org/ticket/15009 |
---|
7 | // http://bugs.dojotoolkit.org/ticket/15012 |
---|
8 | |
---|
9 | doh.register("dojox.mvc.tests.doh.StatefulModelOptions", [ |
---|
10 | function createStatefulModel(){ |
---|
11 | var model = new StatefulModel({data: { |
---|
12 | prop1 : "String", |
---|
13 | prop2 : 10, |
---|
14 | prop3 : void 0, |
---|
15 | prop4 : null |
---|
16 | }}); |
---|
17 | doh.is("String", model.prop1.get("value"), "prop1 should be String"); |
---|
18 | doh.is(10, model.prop2.get("value"), "prop2 should be 10"); |
---|
19 | doh.is(void 0, model.prop3.get("value"), "prop3 should be undefined"); |
---|
20 | doh.is(null, model.prop4.get("value"), "prop4 should be null"); |
---|
21 | } |
---|
22 | ]); |
---|
23 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.