优化结构
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user