(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func TestEncodeOperatorEmail(t *testing.T) { |
| 10 | tests := []struct { |
| 11 | email string |
| 12 | want string |
| 13 | }{ |
| 14 | { |
| 15 | "hello@bb.com", |
| 16 | "hello_bb_com", |
| 17 | }, |
| 18 | { |
| 19 | "Hello123@BB.com", |
| 20 | "hello123_bb_com", |
| 21 | }, |
| 22 | { |
| 23 | "0123456789012345678901234567890123456789012345678901234567890123456789", |
| 24 | "012345678901234567890123456789012345678901234567890123456789012", |
| 25 | }, |
| 26 | { |
| 27 | "012345678901234567890123456789012345678901234567890123456789012", |
| 28 | "012345678901234567890123456789012345678901234567890123456789012", |
| 29 | }, |
| 30 | } |
| 31 | |
| 32 | for _, test := range tests { |
| 33 | got := encodeOperatorEmail(test.email) |
| 34 | require.Equal(t, test.want, got) |
| 35 | } |
| 36 | } |
nothing calls this directly
no test coverage detected