Hello folks!
I want to check something , I think maybe I misunderstood the exercise, because the tests cases don’t behave in the way I expected
The second exercise item ( 2. Send an alert) say something like:
If the log label is error or fatal , send the alert to the ops team.
No matter if it’s legacy or not
But for the “fatal” case is checked at “unknown code sends alert to dev team 1 for a legacy app” test case instead of been check at “fatal code sends alert to ops” test case
As far as i understood, this assert is wrong, it checks fatal level and return dev1
assert LogLevel.alert_recipient(5, true) == :dev1
And It should be added this assert at “fatal code sends alert to ops”
Hi Andre! Thanks for the welcome
You are right, it was my bad, I was using the integer log value instead instead of using the label (atom) from LogLevel.to_label/2 function