d52f60c54e
- Add CalendarEvents method to recordingAPI in auth_test.go - Add CalendarEvents method to fakeCore in handlers_test.go Co-Authored-By: opencode <opencode@anthropic.com>
21 lines
429 B
Go
21 lines
429 B
Go
package config
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
"testing"
|
|
)
|
|
|
|
// writeFile is a tiny helper used by the test files; inlined so config_test.go
|
|
// stays self-contained without a shared helpers file.
|
|
func writeFile(t *testing.T, path, body string) error {
|
|
t.Helper()
|
|
dir := filepath.Dir(path)
|
|
if dir != "" {
|
|
if err := os.MkdirAll(dir, 0o700); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
return os.WriteFile(path, []byte(body), 0o600)
|
|
}
|