refactor: Add test for parsing date in schedule_parser_test.go

This commit is contained in:
windyboy
2024-07-31 21:46:47 +08:00
parent 20872710ce
commit 7222be4b59
+11
View File
@@ -64,6 +64,17 @@ var _ = Describe("Schedule Parser", func() {
})
Describe("Date Parser", func() {
Context("parse : 31OCT", func() {
message := "31OCT"
data := parse(message, DateExpression)
It("should return a valid date", func() {
Expect(data).NotTo(BeNil())
Expect(data[Date]).To(Equal("31OCT"))
})
})
})
Describe("Flight Number Parser", func() {
Context("parse : FM9134", func() {
It("should return a valid flight number", func() {