Merge pull request #411 from phicode/vendoring

tests: make path assertions aware of vendoring
This commit is contained in:
Manu Mtz.-Almeida
2016-01-27 03:22:48 +01:00
4 changed files with 23 additions and 13 deletions

View File

@ -153,7 +153,7 @@ func TestContextHandlerName(t *testing.T) {
c, _, _ := CreateTestContext()
c.handlers = HandlersChain{func(c *Context) {}, handlerNameTest}
assert.Equal(t, c.HandlerName(), "github.com/gin-gonic/gin.handlerNameTest")
assert.Regexp(t, "^(.*/vendor/)?github.com/gin-gonic/gin.handlerNameTest$", c.HandlerName())
}
func handlerNameTest(c *Context) {