     end
   end
 
+  test "assert email sent with wrong header" do
+    assert_raise ExUnit.AssertionError, fn ->
+      assert_email_sent(headers: %{"Revengers" => "Gather"})
+    end
+  end
+
   test "assert email sent with wrong email", %{email: email} do
     assert_raise ExUnit.AssertionError, fn ->
       assert_email_sent(email |> subject("Wrong"))

      |> to(["steve.rogers@example.com", "bruce.banner@example.com"])
      |> cc(["natasha.romanoff@example.com", "stephen.strange@example.com"])
      |> bcc("loki.odinson@example.com")
      |> subject("Hello, Avengers!")
      |> html_body("some html")
      |> text_body("some text")

    end
  end

  test "refute email sent with specific header" do
    refute_email_sent(headers: unquote(%{"Revengers" => "Gather"}))
  end

  test "refute email sent with expected header" do
    assert_raise ExUnit.AssertionError, fn ->
      refute_email_sent(headers: unquote(%{"Avengers" => "Assemble"}))
    end
  end

  test "refute email sent with specific subject" do
    refute_email_sent(subject: "Hello, League!")
  end
