diff --git a/api/commenter_session_update_test.go b/api/commenter_session_update_test.go index 9d27bc6..327537c 100644 --- a/api/commenter_session_update_test.go +++ b/api/commenter_session_update_test.go @@ -13,6 +13,24 @@ func TestCommenterSessionUpdateBasics(t *testing.T) { t.Errorf("unexpected error updating commenter session: %v", err) return } + + statement := ` + SELECT commenterHex + FROM commenterSessions + WHERE commenterToken = $1; + ` + row := db.QueryRow(statement, commenterToken) + + var commenterHex string + if err := row.Scan(&commenterHex); err != nil { + t.Errorf("error scanning commenterHex: %v", err) + return + } + + if commenterHex != "temp-commenter-hex" { + t.Errorf("expected commenterHex=temp-commenter-hex got commenterHex=%s", commenterHex) + return + } } func TestCommenterSessionUpdateEmpty(t *testing.T) {