mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 16:24:03 +03:00
Add method for validation of the secret
This commit is contained in:
@@ -99,6 +99,17 @@ func (suite *SecretTestSuite) TestInvariant() {
|
||||
suite.Equal("google.com", parsed.Host)
|
||||
}
|
||||
|
||||
func (suite *SecretTestSuite) TestValid() {
|
||||
s := mtglib.Secret{}
|
||||
suite.False(s.Valid())
|
||||
|
||||
s.Key[0] = 1
|
||||
suite.False(s.Valid())
|
||||
|
||||
s.Host = "11"
|
||||
suite.True(s.Valid())
|
||||
}
|
||||
|
||||
func TestSecret(t *testing.T) {
|
||||
t.Parallel()
|
||||
suite.Run(t, &SecretTestSuite{})
|
||||
|
||||
Reference in New Issue
Block a user