Allow tests to be run in any order.
This commit is contained in:
parent
7e31368fa3
commit
fee00d5bc9
2 changed files with 3 additions and 2 deletions
|
@ -11,6 +11,7 @@ CREATE TABLE models (
|
|||
|
||||
-- Insert default data.
|
||||
INSERT INTO models(name, amount) VALUES ('test', 50);
|
||||
INSERT INTO models(name, amount) VALUES ('updatable', 33.12);
|
||||
|
||||
-- Create default composite models table.
|
||||
CREATE TABLE composite_models (
|
||||
|
|
|
@ -250,7 +250,7 @@ test "repository element update" {
|
|||
|
||||
// Update a model's name.
|
||||
try updateQuery.set(.{ .name = "newname" });
|
||||
try updateQuery.whereValue(usize, "id", "=", 1);
|
||||
try updateQuery.whereValue(usize, "id", "=", 2);
|
||||
updateQuery.returningAll();
|
||||
|
||||
// Build SQL.
|
||||
|
@ -267,7 +267,7 @@ test "repository element update" {
|
|||
|
||||
// Check the updated model.
|
||||
try std.testing.expectEqual(1, result.models.len);
|
||||
try std.testing.expectEqual(1, result.models[0].id);
|
||||
try std.testing.expectEqual(2, result.models[0].id);
|
||||
try std.testing.expectEqualStrings("newname", result.models[0].name);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue