(t *testing.T)
| 9 | ) |
| 10 | |
| 11 | func TestWherePartsAppendToSql(t *testing.T) { |
| 12 | parts := []Sqlizer{ |
| 13 | newWherePart("x = ?", 1), |
| 14 | newWherePart(nil), |
| 15 | newWherePart(Eq{"y": 2}), |
| 16 | } |
| 17 | sql := &bytes.Buffer{} |
| 18 | args, _ := appendToSql(parts, sql, " AND ", []interface{}{}) |
| 19 | assert.Equal(t, "x = ? AND y = ?", sql.String()) |
| 20 | assert.Equal(t, []interface{}{1, 2}, args) |
| 21 | } |
| 22 | |
| 23 | func TestWherePartsAppendToSqlErr(t *testing.T) { |
| 24 | parts := []Sqlizer{newWherePart(1)} |
nothing calls this directly
no test coverage detected
searching dependent graphs…