adjust tests in main
This commit is contained in:
parent
10b1c395ed
commit
dce0f0d0e0
1 changed files with 2 additions and 11 deletions
13
src/main.zig
13
src/main.zig
|
@ -486,7 +486,7 @@ test "Atom feed has correct structure" {
|
|||
try std.testing.expect(std.mem.indexOf(u8, atom_content, "github") != null);
|
||||
try std.testing.expect(std.mem.indexOf(u8, atom_content, "</author>") != null);
|
||||
|
||||
try std.testing.expect(std.mem.indexOf(u8, atom_content, "<summary>Test release</summary>") != null);
|
||||
try std.testing.expect(std.mem.indexOf(u8, atom_content, "<content type=\"html\"><p>Test release</p>") != null);
|
||||
try std.testing.expect(std.mem.indexOf(u8, atom_content, "<category term=\"github\"/>") != null);
|
||||
}
|
||||
|
||||
|
@ -864,17 +864,8 @@ test "Age-based release filtering" {
|
|||
try std.testing.expect(!found_old);
|
||||
}
|
||||
|
||||
test "RELEASE_AGE_LIMIT_SECONDS constant verification" {
|
||||
// Verify the constant is set to 1 year in seconds
|
||||
const expected_year_in_seconds = 365 * 24 * 60 * 60;
|
||||
try std.testing.expectEqual(expected_year_in_seconds, RELEASE_AGE_LIMIT_SECONDS);
|
||||
|
||||
// Verify it's approximately 31.5 million seconds (1 year)
|
||||
try std.testing.expect(RELEASE_AGE_LIMIT_SECONDS > 31_000_000);
|
||||
try std.testing.expect(RELEASE_AGE_LIMIT_SECONDS < 32_000_000);
|
||||
}
|
||||
|
||||
// Import timestamp tests
|
||||
test {
|
||||
std.testing.refAllDecls(@import("timestamp_tests.zig"));
|
||||
std.testing.refAllDecls(@import("atom.zig"));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue