Fix broken tests due to spacing
This commit is contained in:
parent
8d92b5a9dd
commit
d2862ef281
2 changed files with 3 additions and 3 deletions
|
@ -1 +1 @@
|
|||
UPDATE thing happy, "fun", "stuff" SET ("col2", "fun"."col3", "col1") = ($1, $2, $3) WHERE (aa=$4 or bb=$5 or cc=$6) OR (dd=$7 or ee=$8 or ff=$9 and gg=$10) LIMIT 5;
|
||||
UPDATE thing happy, "fun", "stuff" SET ("col2", "fun"."col3", "col1") = ($1,$2,$3) WHERE (aa=$4 or bb=$5 or cc=$6) OR (dd=$7 or ee=$8 or ff=$9 and gg=$10) LIMIT 5;
|
|
@ -41,14 +41,14 @@ func Test{{$tableNamePlural}}Upsert(t *testing.T) {
|
|||
}
|
||||
|
||||
query := o.generateUpsertQuery(false, upsertCols)
|
||||
expectedQuery := `INSERT INTO {{.Table.Name}} ("thing", "stuff") VALUES ($1, $2) ON CONFLICT DO NOTHING`
|
||||
expectedQuery := `INSERT INTO {{.Table.Name}} ("thing", "stuff") VALUES ($1,$2) ON CONFLICT DO NOTHING`
|
||||
|
||||
if query != expectedQuery {
|
||||
t.Errorf("Expected query mismatch:\n\n%s\n%s\n", query, expectedQuery)
|
||||
}
|
||||
|
||||
query = o.generateUpsertQuery(true, upsertCols)
|
||||
expectedQuery = `INSERT INTO {{.Table.Name}} ("thing", "stuff") VALUES ($1, $2) ON CONFLICT ("key1", "key2") DO UPDATE SET "aaa" = EXCLUDED."aaa", "bbb" = EXCLUDED."bbb"`
|
||||
expectedQuery = `INSERT INTO {{.Table.Name}} ("thing", "stuff") VALUES ($1,$2) ON CONFLICT ("key1", "key2") DO UPDATE SET "aaa" = EXCLUDED."aaa", "bbb" = EXCLUDED."bbb"`
|
||||
|
||||
if query != expectedQuery {
|
||||
t.Errorf("Expected query mismatch:\n\n%s\n%s\n", query, expectedQuery)
|
||||
|
|
Loading…
Add table
Reference in a new issue