INNER CODE UNIT · Go
TestCommonCommandsList
chriswalz/bit · cmd/cmd_test.go:38
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"}
notexpects := []string{"origin/master", "origin/HEAD", "origin/fix-sync-upstream"}
reality := branchToString(BranchList())
for _, e := range expects {
assert.Contains(t, reality, e)
}
for _, ne := range notexpects {
assert.NotContains(t, reality, ne)
}