mirror of
https://github.com/warmbly/warmbly.git
synced 2026-11-28 08:05:45 +00:00
18 lines
484 B
Go
18 lines
484 B
Go
package orgtransfer
|
|
|
|
import (
|
|
"encoding/json"
|
|
"testing"
|
|
)
|
|
|
|
// An archived client secret that is not sealed is a placeholder, never a secret to store.
|
|
func TestDropUnsealedOAuthSecret(t *testing.T) {
|
|
for in, want := range map[string]string{`"***"`: ``, `""`: ``} {
|
|
row := map[string]json.RawMessage{"client_secret": json.RawMessage(in)}
|
|
dropUnsealedOAuthSecret(nil, row)
|
|
if got := jsonString(row["client_secret"]); got != want {
|
|
t.Errorf("%s kept as %q", in, got)
|
|
}
|
|
}
|
|
}
|