Skip to content

Commit

Permalink
test: add coverage for is_burner_domain with invalid input
Browse files Browse the repository at this point in the history
  • Loading branch information
Betree committed Mar 27, 2024
1 parent 7f63c0d commit 0d4e5f8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/burnex_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ defmodule BurnexTest do
refute Enum.any?(Burnex.providers(), &(String.downcase(&1) != &1))
end

describe "is_burner_domain" do
test "with invalid input" do
assert Burnex.is_burner_domain?(nil)
assert Burnex.is_burner_domain?(42)
assert Burnex.is_burner_domain?(%{})
end
end

property "doesn't explode if email has bad format" do
check all(email <- StreamData.string(:alphanumeric)) do
refute Burnex.is_burner?(email)
Expand Down

0 comments on commit 0d4e5f8

Please sign in to comment.