mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vfmt: change all '$expr' to '${expr}' (#16428)
This commit is contained in:
@ -15,13 +15,13 @@ fn (mut app App) index() vweb.Result {
|
||||
app.set_csrf_cookie(csrf.HttpOnly{false})
|
||||
// Get the token-value from the csrf-cookie that was just setted
|
||||
token := app.get_csrf_token() or { panic(err) }
|
||||
return app.text("Csrf-Token set! It's value is: $token")
|
||||
return app.text("Csrf-Token set! It's value is: ${token}")
|
||||
}
|
||||
|
||||
fn test_send_a_request_to_homepage_expecting_a_csrf_cookie() {
|
||||
spawn vweb.run_at(&App{}, vweb.RunParams{ port: sport })
|
||||
time.sleep(500 * time.millisecond)
|
||||
res := http.get('http://localhost:$sport/')?
|
||||
res := http.get('http://localhost:${sport}/')?
|
||||
if res.header.str().contains('__Host-Csrf-Token') {
|
||||
assert true
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user