checkout_test.go 308 字节
Newer Older
J
Jingwen Owen Ou 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14
package commands

import (
	"github.com/bmizerany/assert"
	"testing"
)

func TestParsePullRequestId(t *testing.T) {
	url := "https://github.com/jingweno/gh/pull/73"
	assert.Equal(t, "73", parsePullRequestId(url))

	url = "https://github.com/jingweno/gh/pull/"
	assert.Equal(t, "", parsePullRequestId(url))
}