Skip to content

Commit

Permalink
added a few more tests for polls
Browse files Browse the repository at this point in the history
  • Loading branch information
jkubuni committed Jun 23, 2024
1 parent 072198b commit 8a3cc0c
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"class" : {
"extractPathFrom:" : " 6/23/2024 14:02:55",
"imageFormFrom:" : " 6/23/2024 14:02:55",
"newWith:" : " 6/23/2024 14:02:55" },
"extractPathFrom:" : "6/23/2024 14:02:55",
"imageFormFrom:" : "6/23/2024 14:02:55",
"newWith:" : "6/23/2024 14:02:55" },
"instance" : {
"core" : " 6/23/2024 14:02:55",
"core:" : " 6/23/2024 14:02:55",
"getFormFor:" : " 6/23/2024 14:02:55",
"getFormPromiseFor:" : " 6/23/2024 14:02:55",
"core" : "6/23/2024 14:02:55",
"core:" : "6/23/2024 14:02:55",
"getFormFor:" : "6/23/2024 14:02:55",
"getFormPromiseFor:" : "6/23/2024 14:02:55",
"requestImageFor:with:" : "6/22/2024 13:42:57" } }
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
{
"class" : {
"extractPathFrom:" : " 6/23/2024 14:02:55",
"extractPathFrom:" : "6/23/2024 14:02:55",
"imageFormFrom:" : "JK 6/21/2024 13:46",
"newWith:" : "JK 6/20/2024 22:18",
"stickerFormFrom:" : " 6/23/2024 14:02:55" },
"stickerFormFrom:" : "6/23/2024 14:02:55" },
"instance" : {
"core" : " 6/23/2024 14:02:55",
"core:" : " 6/23/2024 14:02:55",
"core" : "6/23/2024 14:02:55",
"core:" : "6/23/2024 14:02:55",
"downloadStickerSet:" : "JK 6/19/2024 11:33",
"getFormFor:" : " 6/23/2024 14:02:55",
"getFormPromiseFor:" : " 6/23/2024 14:02:55",
"getFormFor:" : "6/23/2024 14:02:55",
"getFormPromiseFor:" : "6/23/2024 14:02:55",
"getInstalledStickers" : " 6/23/2024 17:46:17",
"loadStickerIds" : "JK 6/20/2024 23:39",
"requestStickerFor:with:" : "JK 5/16/2024 21:40",
"stickerIds" : " 6/23/2024 17:46:17",
"stickerIds:" : " 6/23/2024 17:46:17",
"stickerSets" : "JK 6/19/2024 11:30",
"stickerSets:" : "JK 6/19/2024 11:30",
"storeStickerSet:" : "JK 6/23/2024 16:33" } }
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"class" : {
"extractPathFrom:" : " 6/23/2024 14:02:55",
"imageFormFrom:" : " 6/23/2024 14:02:55" },
"extractPathFrom:" : "6/23/2024 14:02:55",
"imageFormFrom:" : "6/23/2024 14:02:55" },
"instance" : {
"getFormFor:" : " 6/23/2024 14:02:55",
"getFormPromiseFor:" : " 6/23/2024 14:02:55",
"getFormFor:" : "6/23/2024 14:02:55",
"getFormPromiseFor:" : "6/23/2024 14:02:55",
"getVideoFor:" : "JK 6/12/2024 19:48",
"getVideoPromiseFor:" : "JK 6/12/2024 19:56" } }
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,10 @@ testPollMessageCorrectlyConstructedFromJson
pollMessageEvent := TCTMMocks mockPollMessageJsonFrom: chat id.
pollMessage := TCCMessage newFromMessageEvent: pollMessageEvent in: chat with: self core.

self assert: pollMessage allowsMultipleAnswers equals: true
self assert: pollMessage allowsMultipleAnswers equals: true.
self assert: 'Question' equals: pollMessage question.
self assert: 'pollTypeRegular' equals: pollMessage pollType.
self assert: false equals: pollMessage isClosed.
self assert: false equals: pollMessage isAnonymous.
self assert: 'Question' equals: pollMessage asText.
self assert: 'Question' equals: pollMessage asSnippet.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"testNotSupportedMessageTypeIdentifiedCorrectly" : "js 7/31/2022 10:29",
"testPhotoMessageCorrectlyConstructedFromJson" : "JK 6/23/2024 14:31",
"testPhotoMessageTypeIdentifiedCorrectly" : "JK 6/23/2024 11:26",
"testPollMessageCorrectlyConstructedFromJson" : "TU 6/23/2024 16:36",
"testPollMessageCorrectlyConstructedFromJson" : "JK 6/23/2024 17:58",
"testPollMessageTypeIdentifiedCorrectly" : "TU 6/23/2024 16:41",
"testSenderNameInChannelMessage" : "tom.richter 7/25/2021 11:36",
"testSenderNameInNonChannelMessage" : "per 7/17/2021 16:13",
Expand Down

0 comments on commit 8a3cc0c

Please sign in to comment.