diff --git a/Squello-Tests.package/SPBJsonLoadTests.class/instance/testCardLoad.st b/Squello-Tests.package/SPBJsonLoadTests.class/instance/testCardLoad.st index 92d4931c..02f6a3f9 100644 --- a/Squello-Tests.package/SPBJsonLoadTests.class/instance/testCardLoad.st +++ b/Squello-Tests.package/SPBJsonLoadTests.class/instance/testCardLoad.st @@ -2,7 +2,7 @@ testing testCardLoad | json card | - json := '{"closed":true,"assignees":[{"id":2,"login":"your cat"}],"title":"the title","id":11,"body":"the body","isNote":true,"labels":[{"id":2,"color":"0000FF","title":"Feature"}]}' parseAsJson. + json := '{"closed":true,"assignees":[{"id":2,"login":"your cat"}],"title":"the title","id":11,"body":"the body","isNote":true,"labels":[{"id":2,"color":"0000FF","name":"Feature"}]}' parseAsJson. card := SPBCard new buildLocalCard: json. self assert: card isClosed. self assert: card title equals: 'the title'. diff --git a/Squello-Tests.package/SPBJsonLoadTests.class/instance/testLabelLoad.st b/Squello-Tests.package/SPBJsonLoadTests.class/instance/testLabelLoad.st index 64eb1c30..d36948e8 100644 --- a/Squello-Tests.package/SPBJsonLoadTests.class/instance/testLabelLoad.st +++ b/Squello-Tests.package/SPBJsonLoadTests.class/instance/testLabelLoad.st @@ -2,7 +2,7 @@ testing testLabelLoad | json label| - json := '{"title": "TODO", "id": 42, "color": "FF0000"}' parseAsJson. + json := '{"name": "TODO", "id": 42, "color": "FF0000"}' parseAsJson. label := SPBLabel newFrom: json. self assert: label title equals: 'TODO'. self assert: label id equals: 42. diff --git a/Squello-Tests.package/SPBJsonLoadTests.class/methodProperties.json b/Squello-Tests.package/SPBJsonLoadTests.class/methodProperties.json index 4478feca..7eec6b51 100644 --- a/Squello-Tests.package/SPBJsonLoadTests.class/methodProperties.json +++ b/Squello-Tests.package/SPBJsonLoadTests.class/methodProperties.json @@ -3,5 +3,5 @@ }, "instance" : { "testAssigneeLoad" : "FP 6/25/2024 11:16", - "testCardLoad" : "FP 7/2/2024 11:29", - "testLabelLoad" : "FP 7/2/2024 11:31" } } + "testCardLoad" : "AH 7/7/2024 17:14", + "testLabelLoad" : "AH 7/7/2024 17:14" } } diff --git a/Squello-Tests.package/SPBJsonSaveTests.class/instance/testLabelToJson.st b/Squello-Tests.package/SPBJsonSaveTests.class/instance/testLabelToJson.st index 07be2bd6..73cb6dd7 100644 --- a/Squello-Tests.package/SPBJsonSaveTests.class/instance/testLabelToJson.st +++ b/Squello-Tests.package/SPBJsonSaveTests.class/instance/testLabelToJson.st @@ -4,5 +4,5 @@ testLabelToJson | json | json := self defaultLabel asJson. self assert: 1234 equals: (json at: 'id'). - self assert: 'this is a label' = (json at: 'title'). + self assert: 'this is a label' = (json at: 'name'). self assert: 'FF0000' = (json at: 'color'). \ No newline at end of file diff --git a/Squello-Tests.package/SPBJsonSaveTests.class/methodProperties.json b/Squello-Tests.package/SPBJsonSaveTests.class/methodProperties.json index c07db87c..bd99376a 100644 --- a/Squello-Tests.package/SPBJsonSaveTests.class/methodProperties.json +++ b/Squello-Tests.package/SPBJsonSaveTests.class/methodProperties.json @@ -15,4 +15,4 @@ "testBoardToJson" : "FP 7/4/2024 15:46", "testCardToJson" : "FP 6/25/2024 11:54", "testColumnToJson" : "FP 6/25/2024 15:34", - "testLabelToJson" : "FP 6/25/2024 11:29" } } + "testLabelToJson" : "AH 7/7/2024 17:14" } } diff --git a/Squello-Tests.package/SPBLabelTests.class/instance/testJson.st b/Squello-Tests.package/SPBLabelTests.class/instance/testJson.st new file mode 100644 index 00000000..28141757 --- /dev/null +++ b/Squello-Tests.package/SPBLabelTests.class/instance/testJson.st @@ -0,0 +1,12 @@ +tests +testJson + + | json | + label color: Color red; + title: 'Hello World'; + id: 42. + json:= label asJson. + self assert: (json at: 'name') equals: 'Hello World'. + self assert: (json at: 'id') equals: 42. + self assert: (json at: 'color') equals: 'FF0000'. + self assert: json size equals: 3. \ No newline at end of file diff --git a/Squello-Tests.package/SPBLabelTests.class/methodProperties.json b/Squello-Tests.package/SPBLabelTests.class/methodProperties.json index a9a3be77..26a0af89 100644 --- a/Squello-Tests.package/SPBLabelTests.class/methodProperties.json +++ b/Squello-Tests.package/SPBLabelTests.class/methodProperties.json @@ -9,5 +9,6 @@ "testColor" : "lo 5/23/2022 16:53", "testHash" : "lo 6/5/2022 15:24", "testId" : "lo 5/23/2022 16:55", + "testJson" : "AH 7/7/2024 17:18", "testJsonWriteOn" : "NTK 7/23/2022 11:04", "testTitle" : "lo 5/23/2022 16:56" } }