blob: 50b5691c58ad763b0d8e8d11c54a0b7c2b7783da (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package config
import . "gopkg.in/check.v1"
type ModuleSuite struct{}
var _ = Suite(&ModuleSuite{})
func (s *ModuleSuite) TestModuleValidateMissingURL(c *C) {
m := &Module{Path: "foo"}
c.Assert(m.Validate(), Equals, ErrModuleEmptyURL)
}
func (s *ModuleSuite) TestModuleValidateMissingName(c *C) {
m := &Module{URL: "bar"}
c.Assert(m.Validate(), Equals, ErrModuleEmptyPath)
}
func (s *ModuleSuite) TestModuleValidateDefault(c *C) {
m := &Module{Path: "foo", URL: "http://foo/bar"}
c.Assert(m.Validate(), IsNil)
c.Assert(m.Branch, Equals, DefaultModuleBranch)
}
|