Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Jan 23, 2025
1 parent 1eb2948 commit de8ebba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vlib/x/sessions/tests/session_app_test.v
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub fn (mut app App) before_accept_loop() {
}

pub fn (app &App) session_data(mut ctx Context) veb.Result {
return ctx.text(ctx.session_data.str())
return ctx.text('${ctx.session_data}')
}

pub fn (app &App) protected(mut ctx Context) veb.Result {
Expand Down Expand Up @@ -122,7 +122,7 @@ fn test_save_session() {
x := make_request_with_session_id(.get, '/session_data', sid)!

// cast to `?User` since, session_data is of type `?T`
assert x.body == ?User(default_user).str()
assert x.body == '${?User(default_user)}'
}

fn test_update_session() {
Expand All @@ -133,7 +133,7 @@ fn test_update_session() {

mut updated_user := default_user
updated_user.age++
assert x.body == ?User(updated_user).str()
assert x.body == '${?User(updated_user)}'
}

fn test_destroy_session() {
Expand Down

0 comments on commit de8ebba

Please sign in to comment.