21 lines
429 B
Go
21 lines
429 B
Go
package migrations_test
|
|
|
|
import (
|
|
"os"
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestUp015ScopesPreferencesByTenantAndActor(t *testing.T) {
|
|
b, e := os.ReadFile("000015_user_preferences.up.sql")
|
|
if e != nil {
|
|
t.Fatal(e)
|
|
}
|
|
s := strings.ToUpper(string(b))
|
|
for _, x := range []string{"USER_PREFERENCES", "TENANT_KEY", "EXTERNAL_ACTOR_ID", "LANGUAGE_MODE", "LOCALE"} {
|
|
if !strings.Contains(s, x) {
|
|
t.Errorf("missing %s", x)
|
|
}
|
|
}
|
|
}
|