fix(model): TXT сравнивается байт-точно (без схлопывания пробелов)
This commit is contained in:
@@ -99,6 +99,14 @@ func TestEqualTXTCaseSensitive(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestEqualTXTWhitespaceSignificant(t *testing.T) {
|
||||
a := Record{Type: TXT, Name: "example.com.", TTL: 60, Values: []string{"v=spf1 a"}}
|
||||
b := Record{Type: TXT, Name: "example.com.", TTL: 60, Values: []string{"v=spf1 a"}}
|
||||
if a.Equal(b) {
|
||||
t.Fatal("TXT records differing only in whitespace count must not be equal (byte-exact comparison)")
|
||||
}
|
||||
}
|
||||
|
||||
func TestEqualTTLMatters(t *testing.T) {
|
||||
a := Record{Type: A, Name: "example.com.", TTL: 300, Values: []string{"1.2.3.4"}}
|
||||
b := Record{Type: A, Name: "example.com.", TTL: 600, Values: []string{"1.2.3.4"}}
|
||||
|
||||
Reference in New Issue
Block a user