mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 00:40:54 +00:00
fix orm test
This commit is contained in:
parent
a879e412a1
commit
65631e0522
@ -1417,7 +1417,7 @@ func TestRawQueryRow(t *testing.T) {
|
|||||||
)
|
)
|
||||||
|
|
||||||
cols = []string{
|
cols = []string{
|
||||||
"id", "status", "profile_id",
|
"id", "Status", "profile_id",
|
||||||
}
|
}
|
||||||
query = fmt.Sprintf("SELECT %s%s%s FROM %suser%s WHERE id = ?", Q, strings.Join(cols, sep), Q, Q, Q)
|
query = fmt.Sprintf("SELECT %s%s%s FROM %suser%s WHERE id = ?", Q, strings.Join(cols, sep), Q, Q, Q)
|
||||||
err = dORM.Raw(query, 4).QueryRow(&uid, &status, &pid)
|
err = dORM.Raw(query, 4).QueryRow(&uid, &status, &pid)
|
||||||
@ -1497,7 +1497,7 @@ func TestRawValues(t *testing.T) {
|
|||||||
Q := dDbBaser.TableQuote()
|
Q := dDbBaser.TableQuote()
|
||||||
|
|
||||||
var maps []Params
|
var maps []Params
|
||||||
query := fmt.Sprintf("SELECT %suser_name%s FROM %suser%s WHERE %sstatus%s = ?", Q, Q, Q, Q, Q, Q)
|
query := fmt.Sprintf("SELECT %suser_name%s FROM %suser%s WHERE %sStatus%s = ?", Q, Q, Q, Q, Q, Q)
|
||||||
num, err := dORM.Raw(query, 1).Values(&maps)
|
num, err := dORM.Raw(query, 1).Values(&maps)
|
||||||
throwFail(t, err)
|
throwFail(t, err)
|
||||||
throwFail(t, AssertIs(num, 1))
|
throwFail(t, AssertIs(num, 1))
|
||||||
|
Loading…
Reference in New Issue
Block a user