mirror of
https://github.com/TheRealOwenRees/plantid-discord-bot.git
synced 2026-07-23 04:26:57 +00:00
remove threat status text if no iucn data is available
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user