提交 46cf7a2f 编写于 作者: J Jingwen Owen Ou

Add test for hyphenized name

上级 57fbeb89
......@@ -3,9 +3,9 @@ package commands
import (
"github.com/bmizerany/assert"
"github.com/jingweno/gh/github"
"testing"
"os"
"os"
"path/filepath"
"testing"
)
func TestTransformCloneArgs(t *testing.T) {
......@@ -21,10 +21,16 @@ func TestTransformCloneArgs(t *testing.T) {
assert.Equal(t, 1, args.Size())
assert.Equal(t, "git@github.com:jingweno/gh.git", args.First())
github.DefaultConfigFile = "./test_support/gh"
args = NewArgs([]string{"-p", "acl-services/devise-acl"})
transformCloneArgs(args)
assert.Equal(t, 1, args.Size())
assert.Equal(t, "git@github.com:acl-services/devise-acl.git", args.First())
github.DefaultConfigFile = "./test_support/gh"
config := github.Config{User: "jingweno", Token: "123"}
github.SaveConfig(&config)
defer os.RemoveAll(filepath.Dir(github.DefaultConfigFile))
defer os.RemoveAll(filepath.Dir(github.DefaultConfigFile))
args = NewArgs([]string{"-p", "jekyll_and_hyde"})
transformCloneArgs(args)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册