Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
System-Glitch committed Apr 18, 2024
1 parent f39966f commit 5681fb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions settings_test.go
Expand Up @@ -1386,8 +1386,8 @@ func TestSelectScope(t *testing.T) {

db = openDryRunDB(t)
db = db.Scopes(selectScope(sch.Table, []*schema.Field{}, true)).Select("*, 1 + 1 AS count").Find(nil)
assert.Equal(t, []string{"1"}, db.Statement.Selects)
assert.Equal(t, []clause.Column{{Raw: true, Name: "1"}}, db.Statement.Clauses["SELECT"].Expression.(clause.Select).Columns)
assert.Equal(t, []string{"1", "2"}, db.Statement.Selects)
assert.Equal(t, []clause.Column{{Raw: true, Name: "1"}, {Raw: true, Name: "2"}}, db.Statement.Clauses["SELECT"].Expression.(clause.Select).Columns)

db = openDryRunDB(t)
db = db.Scopes(selectScope(sch.Table, []*schema.Field{{DBName: "c", StructField: reflect.StructField{Tag: `computed:"a+b"`}}}, true)).Select("*, 1 + 1 AS count").Find(nil)
Expand Down

0 comments on commit 5681fb9

Please sign in to comment.