mirror of
https://github.com/jetzig-framework/jetzig.git
synced 2025-05-14 05:56:07 +00:00
Use defer to free hashed_pass
This commit is contained in:
parent
aae890998f
commit
79574ed861
@ -41,12 +41,12 @@ test "setup" {
|
||||
var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
|
||||
defer app.deinit();
|
||||
const hashed_pass = try auth.hashPassword(app.allocator, "test");
|
||||
defer app.allocator.free(hashed_pass);
|
||||
try app.repo.insert(.User, .{
|
||||
.id = 1,
|
||||
.email = "test@test.com",
|
||||
.password_hash = hashed_pass,
|
||||
});
|
||||
app.allocator.free(hashed_pass);
|
||||
}
|
||||
|
||||
test "post" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user