mirror of
https://github.com/DeBrosOfficial/orama.git
synced 2026-03-17 20:46:58 +00:00
fix: update test to verify is_active value as 1 instead of TRUE
This commit is contained in:
parent
1882876922
commit
25495448ed
@ -229,15 +229,15 @@ func TestUpdateNamespaceRecord_SetsActiveTrue(t *testing.T) {
|
|||||||
t.Fatalf("unexpected error: %v", err)
|
t.Fatalf("unexpected error: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verify the SQL contains is_active = TRUE for both FQDN and wildcard
|
// Verify the SQL contains is_active = 1 for both FQDN and wildcard
|
||||||
activeCount := 0
|
activeCount := 0
|
||||||
for _, call := range mockDB.execCalls {
|
for _, call := range mockDB.execCalls {
|
||||||
if strings.Contains(call.Query, "is_active = TRUE") && strings.Contains(call.Query, "UPDATE dns_records") {
|
if strings.Contains(call.Query, "is_active = 1") && strings.Contains(call.Query, "UPDATE dns_records") {
|
||||||
activeCount++
|
activeCount++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if activeCount != 2 {
|
if activeCount != 2 {
|
||||||
t.Fatalf("expected 2 UPDATE queries with is_active = TRUE (fqdn + wildcard), got %d", activeCount)
|
t.Fatalf("expected 2 UPDATE queries with is_active = 1 (fqdn + wildcard), got %d", activeCount)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user