diff --git a/pkg/analyzer/content_test.go b/pkg/analyzer/content_test.go index 0aa7ff9..9289d95 100644 --- a/pkg/analyzer/content_test.go +++ b/pkg/analyzer/content_test.go @@ -76,17 +76,17 @@ func TestExtractTextFromHTML(t *testing.T) { { name: "Multiple elements", html: "
Paragraph
Text
More
", - expectedText: "TextMore", + expectedText: "Text More", }, { name: "With style tag", html: "Text
More
", - expectedText: "TextMore", + expectedText: "Text More", }, { name: "Empty HTML", diff --git a/pkg/analyzer/headers_test.go b/pkg/analyzer/headers_test.go index 6a35d18..2513e6f 100644 --- a/pkg/analyzer/headers_test.go +++ b/pkg/analyzer/headers_test.go @@ -83,8 +83,8 @@ func TestCalculateHeaderScore(t *testing.T) { Date: "Mon, 01 Jan 2024 12:00:00 +0000", Parts: []MessagePart{{ContentType: "text/plain", Content: "test"}}, }, - minScore: 40, - maxScore: 80, + minScore: 80, + maxScore: 90, }, { name: "Invalid Message-ID format", diff --git a/pkg/analyzer/parser_test.go b/pkg/analyzer/parser_test.go index 571f542..eb1fc6a 100644 --- a/pkg/analyzer/parser_test.go +++ b/pkg/analyzer/parser_test.go @@ -106,6 +106,9 @@ Content-Type: text/html; charset=utf-8 } func TestGetAuthenticationResults(t *testing.T) { + // Force hostname + hostname = "example.com" + rawEmail := `From: sender@example.com To: recipient@example.com Subject: Test Email