Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
dim13 committed Mar 12, 2021
1 parent 37058b8 commit ff20209
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions migration/cleanname_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,27 @@ func TestFileName(t *testing.T) {
op *Payload_OtpParameters
want string
}{
{&Payload_OtpParameters{Name: "Test"}, "Test"},
{&Payload_OtpParameters{Name: "A/B:C.d"}, "A_B:C.d"},
{&Payload_OtpParameters{Name: "A/../B:C.d"}, "A_.._B:C.d"},
{
op: &Payload_OtpParameters{
Name: "Test",
Issuer: "Issuer",
},
want: "Test_Issuer",
},
{
op: &Payload_OtpParameters{
Name: "A/B:C.d",
Issuer: "Issuer",
},
want: "A_B:C.d_Issuer",
},
{
op: &Payload_OtpParameters{
Name: "A/../B:C.d",
Issuer: "Issuer",
},
want: "A_.._B:C.d_Issuer",
},
}

for _, tc := range testCases {
Expand Down

0 comments on commit ff20209

Please sign in to comment.