test: use store to delete user

This commit is contained in:
Denis Gukov 2022-11-07 01:31:56 +05:00
parent ac80b91e3f
commit dbcdd7ef17

View File

@ -9,7 +9,6 @@ import (
"github.com/snikch/goodman/transaction" "github.com/snikch/goodman/transaction"
"math/rand" "math/rand"
"os" "os"
"strconv"
"time" "time"
) )
@ -98,7 +97,8 @@ func addUserProjectRelation(pid int, user int) {
} }
func deleteUserProjectRelation(pid int, user int) { func deleteUserProjectRelation(pid int, user int) {
_, err := store.Sql().Exec("delete from project__user where project_id=? and user_id=?", strconv.Itoa(pid), strconv.Itoa(user)) err := store.DeleteProjectUser(pid, user)
//_, err := store.Sql().Exec("delete from project__user where project_id=? and user_id=?", strconv.Itoa(pid), strconv.Itoa(user))
if err != nil { if err != nil {
panic(err) panic(err)
} }