mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-10-16 10:17:41 +00:00
Use global async flag as fallback on per-request flag
This way, if no pre-request flag is specified, the globally configured default is used.
This commit is contained in:
1 parent
9b28d8984f
commit
0914cd16af
2 files changed
+31
-5
No files matched your search
@@ -91,3 +91,21 @@ func (s *ApiSuite) TestGetVersion(c *C) {
|
||||
c.Check(response.Code, Equals, 200)
|
||||
c.Check(response.Body.String(), Matches, ".*Version.*")
|
||||
}
|
||||
|
||||
func (s *ApiSuite) TestTruthy(c *C) {
|
||||
c.Check(truthy("y"), Equals, true)
|
||||
c.Check(truthy("yes"), Equals, true)
|
||||
c.Check(truthy("t"), Equals, true)
|
||||
c.Check(truthy("true"), Equals, true)
|
||||
c.Check(truthy("1"), Equals, true)
|
||||
c.Check(truthy(true), Equals, true)
|
||||
c.Check(truthy(1), Equals, true)
|
||||
|
||||
c.Check(truthy("no"), Equals, false)
|
||||
c.Check(truthy("foobar"), Equals, false)
|
||||
c.Check(truthy(0), Equals, false)
|
||||
c.Check(truthy(-1), Equals, false)
|
||||
c.Check(truthy(false), Equals, false)
|
||||
c.Check(truthy(nil), Equals, false)
|
||||
c.Check(truthy(gin.H{}), Equals, false)
|
||||
}
|
||||
Reference in new issue
Block a user