(t *testing.T)
| 44 | } |
| 45 | |
| 46 | func TestEncode(t *testing.T) { |
| 47 | encryptionSecret, _ := RandomEncryptionSecret() |
| 48 | type args struct { |
| 49 | Input string |
| 50 | } |
| 51 | tests := []struct { |
| 52 | name string |
| 53 | args args |
| 54 | wantErr bool |
| 55 | }{ |
| 56 | { |
| 57 | "", |
| 58 | args{"bGlhbmcuemhhbmdAbWVyaWNvLmRldjprYUU2eWpNY1VYV2FCNUhIS3BGRkQ1RTg="}, |
| 59 | false, |
| 60 | }, |
| 61 | } |
| 62 | for _, tt := range tests { |
| 63 | t.Run(tt.name, func(t *testing.T) { |
| 64 | got, err := Encrypt(encryptionSecret, tt.args.Input) |
| 65 | if (err != nil) != tt.wantErr { |
| 66 | t.Errorf("Encode() error = %v, wantErr %v", err, tt.wantErr) |
| 67 | return |
| 68 | } |
| 69 | t.Log(got) |
| 70 | }) |
| 71 | } |
| 72 | } |
nothing calls this directly
no test coverage detected