Skip to content

Commit 54a67f0

Browse files
committed
Updated test #236
1 parent b720bf0 commit 54a67f0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/groovy/au/org/ala/ecodata/forms/ModelJSTagLibSpec.groovy

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class ModelJSTagLibSpec extends Specification implements TagLibUnitTest<ModelJST
4444
tagLib.renderDataModelItem(ctx)
4545

4646
then:
47-
actualOut.toString().trim() == 'data.myField = ko.observable().extend({numericString:2}).extend({metadata:{metadata:self.dataModel[\'myField\'], context:self.\$context, config:config}});'
47+
actualOut.toString().trim() == 'data.myField = ko.observable().extend({numericString:{"decimalPlaces":2}}).extend({metadata:{metadata:self.dataModel[\'myField\'], context:self.\$context, config:config}});'
4848
}
4949

5050
void "the feature data type doesn't need any special initialisation behaviour"() {
@@ -84,7 +84,7 @@ class ModelJSTagLibSpec extends Specification implements TagLibUnitTest<ModelJST
8484
tagLib.numberViewModel(ctx)
8585

8686
then: "the default is 2"
87-
actualOut.toString().trim() == "data.item1 = ko.observable().extend({numericString:2});"
87+
actualOut.toString().trim() == "data.item1 = ko.observable().extend({numericString:{\"decimalPlaces\":2}});"
8888

8989
when: "a number of decimal places is specified"
9090
ctx.dataModel.decimalPlaces = 3
@@ -93,7 +93,7 @@ class ModelJSTagLibSpec extends Specification implements TagLibUnitTest<ModelJST
9393
tagLib.numberViewModel(ctx)
9494

9595
then:
96-
actualOut.toString().trim() == "data.item1 = ko.observable().extend({numericString:3});"
96+
actualOut.toString().trim() == "data.item1 = ko.observable().extend({numericString:{\"decimalPlaces\":3}});"
9797

9898
}
9999

0 commit comments

Comments
 (0)