Skip to content

Commit

Permalink
Update SpfTests.cs
Browse files Browse the repository at this point in the history
Add unit test for the Multiple Spf Record fail _SpfInvalidException_
  • Loading branch information
markvantilburg authored Oct 1, 2024
1 parent 1c3b0bb commit 10d33f3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions BusinessMonitor.MailTools.Test/SpfTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,21 @@ public void TestInvalidArguments()
});
}

[Test]
public void TestMultipleSPFRecords()
{
DummyResolver resolver = new DummyResolver();
var check = new SpfCheck(resolver);

resolver.AddText("x.businessmonitor.nl", "v=spf1 include:survey.businessmonitor.nl -all");
resolver.AddText("x.businessmonitor.nl", "v=spf1 ip4:192.0.2.1 -all");

Assert.Throws<SpfInvalidException>(() =>
{
check.GetSpfRecord("x.businessmonitor.nl");
});
}

[Test]
public void TestWhitespaces()
{
Expand Down

0 comments on commit 10d33f3

Please sign in to comment.