mirror of
https://github.com/MedzikUser/go-github-selfupdate.git
synced 2024-08-15 03:25:29 +00:00
test validator file suffix
This commit is contained in:
parent
a4d48e7891
commit
b5118a9ebf
1 changed files with 22 additions and 0 deletions
|
@ -112,3 +112,25 @@ func TestECDSAValidatorFail(t *testing.T) {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestValidatorSuffix(t *testing.T) {
|
||||||
|
for _, test := range []struct {
|
||||||
|
v Validator
|
||||||
|
suffix string
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
v: &SHA2Validator{},
|
||||||
|
suffix: ".sha256",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
v: &ECDSAValidator{},
|
||||||
|
suffix: ".sig",
|
||||||
|
},
|
||||||
|
} {
|
||||||
|
want := test.suffix
|
||||||
|
got := test.v.Suffix()
|
||||||
|
if want != got {
|
||||||
|
t.Errorf("Wanted %q but got %q", want, got)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue