(t *testing.T)
| 17 | } |
| 18 | |
| 19 | func TestTransformPushArgs(t *testing.T) { |
| 20 | args := NewArgs([]string{"push", "origin,staging,qa", "bert_timeout"}) |
| 21 | transformPushArgs(args) |
| 22 | cmds := args.Commands() |
| 23 | |
| 24 | assert.Equal(t, 3, len(cmds)) |
| 25 | assert.Equal(t, "git push origin bert_timeout", cmds[0].String()) |
| 26 | assert.Equal(t, "git push staging bert_timeout", cmds[1].String()) |
| 27 | |
| 28 | // TODO: travis-ci doesn't have HEAD |
| 29 | //args = NewArgs([]string{"push", "origin"}) |
| 30 | //transformPushArgs(args) |
| 31 | //cmds = args.Commands() |
| 32 | |
| 33 | //assert.Equal(t, 1, len(cmds)) |
| 34 | //pushRegexp := regexp.MustCompile("git push origin .+") |
| 35 | //assert.T(t, pushRegexp.MatchString(cmds[0].String())) |
| 36 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…