Skip to content

Commit

Permalink
chore: add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SoumenRautray committed Jan 24, 2024
1 parent f9e6300 commit 0ef89a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Tests/Tests/REventLogger/REventLoggerModuleSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class REventLoggerModuleSpec: QuickSpec {
eventLoggerModule.sendCriticalEvent(event.eventId, event)
expect(mockEventStorage.getEventCount()).to(equal(1))
let storedEvent = mockEventStorage.retrieveEvent(event.eventId)
expect(storedEvent?.eventType.rawValue).to(equal("warning"))
expect(storedEvent?.eventType.rawValue).to(equal("1"))
done()
}
}
Expand All @@ -71,7 +71,7 @@ class REventLoggerModuleSpec: QuickSpec {
eventLoggerModule.sendEventIfNeeded(.critical, event.eventId, event, true)
expect(mockEventStorage.getEventCount()).to(equal(1))
let storedEvent = mockEventStorage.retrieveEvent(event.eventId)
expect(storedEvent?.eventType.rawValue).to(equal("warning"))
expect(storedEvent?.eventType.rawValue).to(equal("1"))
done()
}
}
Expand Down
4 changes: 2 additions & 2 deletions Tests/Tests/REventLogger/REventSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class REventsSpec: QuickSpec {
let event = REvent(.warning, sourceName: "IAM",
sourceVersion: "8.0,0", errorCode: "500",
errorMessage: "Network Error", info: nil)
expect(event.eventId).to(equal("warning_1.0_iam_500_network_error"))
expect(event.eventId).to(equal("1_1.0_iam_500_network_error"))
}
it("will increase the occurence count of event") {
var event = REvent(.warning, sourceName: "PNP",
Expand All @@ -30,7 +30,7 @@ class REventsSpec: QuickSpec {
sourceVersion: "4.1.0", errorCode: "500",
errorMessage: "Network", info: nil)
event.updateEventType(type: .critical)
expect(event.eventType.rawValue).to(equal("critical"))
expect(event.eventType.rawValue).to(equal("0"))
}
}
}
Expand Down

0 comments on commit 0ef89a2

Please sign in to comment.