1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-25 13:20:49 +00:00

fix orm test

This commit is contained in:
slene 2014-03-19 10:00:26 +08:00
parent a879e412a1
commit 65631e0522

View File

@ -1417,7 +1417,7 @@ func TestRawQueryRow(t *testing.T) {
)
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)
err = dORM.Raw(query, 4).QueryRow(&uid, &status, &pid)
@ -1497,7 +1497,7 @@ func TestRawValues(t *testing.T) {
Q := dDbBaser.TableQuote()
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)
throwFail(t, err)
throwFail(t, AssertIs(num, 1))