16 lines
384 B
Go
16 lines
384 B
Go
package system
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
)
|
|
|
|
func TestSecurityConfigReturnsNoValueWhenDatabaseIsUnready(t *testing.T) {
|
|
data := newTransactionTestData(t)
|
|
data.databaseReady.Store(false)
|
|
value, err := (&securityRepo{data: data}).SecurityConfig(context.Background())
|
|
if err == nil || value != nil {
|
|
t.Fatalf("SecurityConfig() = %#v, %v; want nil and error", value, err)
|
|
}
|
|
}
|