INNER CODE UNIT · Go
branchToString
chriswalz/bit · cmd/cmd_test.go:30
func branchToString(list []*Branch) []string {
newList := make([]string, len(list))
for i, v := range list {
newList[i] = v.FullName
}
return newList
}
func TestCommonCommandsList(t *testing.T) {
expects := []string{"pull --rebase origin master", "commit -a --amend --no-edit"}
reality := toString(CommonCommandsList())
for _, e := range expects {
assert.Contains(t, reality, e)
}
}
func TestBranchList(t *testing.T) {
expects := []string{"master", "fix-sync-upstream"}