15 lines
259 B
Go
15 lines
259 B
Go
|
package utils_test
|
||
|
|
||
|
import (
|
||
|
"blog/utils"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestGetRepoName(t *testing.T) {
|
||
|
url := "http://jsit205.vaiwan.cn/JiXieShi/blog.git"
|
||
|
name, err := utils.GetRepoName(url)
|
||
|
if err != nil || name != "blog" {
|
||
|
t.Error("repository name error")
|
||
|
}
|
||
|
}
|