some negative tests
This commit is contained in:
parent
321d1f6afd
commit
9392922216
@ -258,11 +258,13 @@ test "test corpus" {
|
|||||||
try testing.expectEqualStrings(membersOfAll[0].name, "Name" ** 8);
|
try testing.expectEqualStrings(membersOfAll[0].name, "Name" ** 8);
|
||||||
try testing.expectEqualStrings(membersOfAll[1].name, "svc-bar");
|
try testing.expectEqualStrings(membersOfAll[1].name, "svc-bar");
|
||||||
try testing.expectEqualStrings(membersOfAll[2].name, "vidmantas");
|
try testing.expectEqualStrings(membersOfAll[2].name, "vidmantas");
|
||||||
|
try testing.expectEqual(corpus.groupname2users.get("404"), null);
|
||||||
|
|
||||||
const groupsOfVidmantas = corpus.username2groups.get("vidmantas").?.items;
|
const groupsOfVidmantas = corpus.username2groups.get("vidmantas").?.items;
|
||||||
try testing.expectEqual(groupsOfVidmantas[0].gid, 1000);
|
try testing.expectEqual(groupsOfVidmantas[0].gid, 1000);
|
||||||
try testing.expectEqual(groupsOfVidmantas[1].gid, 1234);
|
try testing.expectEqual(groupsOfVidmantas[1].gid, 1234);
|
||||||
try testing.expectEqual(groupsOfVidmantas[2].gid, 9999);
|
try testing.expectEqual(groupsOfVidmantas[2].gid, 9999);
|
||||||
|
try testing.expectEqual(corpus.username2groups.get("404"), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn testUser(name: []const u8) User {
|
fn testUser(name: []const u8) User {
|
||||||
|
Loading…
Reference in New Issue
Block a user