-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated mail.Address initialization in tests to make golangci-lint happy
Tests for new mail address handling methods have been updated to use {Name:"", Address: "[email protected]"} format for initializing the []*mail.Address slices, instead of the previous shorthand {"", "[email protected]"}. This was done to increase code clarity and explicitness.
- Loading branch information
Showing
1 changed file
with
15 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2947,22 +2947,22 @@ func TestMsg_ToFromString(t *testing.T) { | |
sf bool | ||
}{ | ||
{"valid single address", "[email protected]", []*mail.Address{ | ||
{"", "[email protected]"}, | ||
{Name: "", Address: "[email protected]"}, | ||
}, false}, | ||
{ | ||
"valid multiple addresses", "[email protected],[email protected]", | ||
[]*mail.Address{ | ||
{"", "[email protected]"}, | ||
{"", "[email protected]"}, | ||
{Name: "", Address: "[email protected]"}, | ||
{Name: "", Address: "[email protected]"}, | ||
}, | ||
false, | ||
}, | ||
{ | ||
"valid multiple addresses with space and name", | ||
`[email protected], "Toni Tester" <[email protected]>`, | ||
[]*mail.Address{ | ||
{"", "[email protected]"}, | ||
{"Toni Tester", "[email protected]"}, | ||
{Name: "", Address: "[email protected]"}, | ||
{Name: "Toni Tester", Address: "[email protected]"}, | ||
}, | ||
false, | ||
}, | ||
|
@@ -3006,22 +3006,22 @@ func TestMsg_CcFromString(t *testing.T) { | |
sf bool | ||
}{ | ||
{"valid single address", "[email protected]", []*mail.Address{ | ||
{"", "[email protected]"}, | ||
{Name: "", Address: "[email protected]"}, | ||
}, false}, | ||
{ | ||
"valid multiple addresses", "[email protected],[email protected]", | ||
[]*mail.Address{ | ||
{"", "[email protected]"}, | ||
{"", "[email protected]"}, | ||
{Name: "", Address: "[email protected]"}, | ||
{Name: "", Address: "[email protected]"}, | ||
}, | ||
false, | ||
}, | ||
{ | ||
"valid multiple addresses with space and name", | ||
`[email protected], "Toni Tester" <[email protected]>`, | ||
[]*mail.Address{ | ||
{"", "[email protected]"}, | ||
{"Toni Tester", "[email protected]"}, | ||
{Name: "", Address: "[email protected]"}, | ||
{Name: "Toni Tester", Address: "[email protected]"}, | ||
}, | ||
false, | ||
}, | ||
|
@@ -3065,22 +3065,22 @@ func TestMsg_BccFromString(t *testing.T) { | |
sf bool | ||
}{ | ||
{"valid single address", "[email protected]", []*mail.Address{ | ||
{"", "[email protected]"}, | ||
{Name: "", Address: "[email protected]"}, | ||
}, false}, | ||
{ | ||
"valid multiple addresses", "[email protected],[email protected]", | ||
[]*mail.Address{ | ||
{"", "[email protected]"}, | ||
{"", "[email protected]"}, | ||
{Name: "", Address: "[email protected]"}, | ||
{Name: "", Address: "[email protected]"}, | ||
}, | ||
false, | ||
}, | ||
{ | ||
"valid multiple addresses with space and name", | ||
`[email protected], "Toni Tester" <[email protected]>`, | ||
[]*mail.Address{ | ||
{"", "[email protected]"}, | ||
{"Toni Tester", "[email protected]"}, | ||
{Name: "", Address: "[email protected]"}, | ||
{Name: "Toni Tester", Address: "[email protected]"}, | ||
}, | ||
false, | ||
}, | ||
|