remove threat status text if no iucn data is available

This commit is contained in:
Owen
2024-12-29 20:16:11 +01:00
committed by Owen Rees
parent edf4364498
commit ffe6fca781
5 changed files with 164 additions and 2 deletions
+8
View File
@@ -26,4 +26,12 @@ defmodule PlantIdDiscordBotTest.PlantNet.Parser do
assert result == PlantNetFixtures.parsed_response_with_urls()
end
test "no iucn data prevents 'Threat Status' from being show in response message" do
message =
PlantNetFixtures.parsed_response_with_urls_no_iucn()
|> Parser.generate_response_message()
refute String.contains?(message, "Threat status: ")
end
end