Files
go-config/json/codec_test.go
eSlider eadcf9fa14 refactor: move testfixtures to internal package and update imports
- Relocated testfixtures from the root to the internal package for better encapsulation.
- Updated import paths in codec test files across env, ini, json, yaml directories to reflect the new location.
- Removed the now obsolete testfixtures.go file.
2026-05-02 20:02:20 +01:00

20 lines
385 B
Go

package json
import (
"context"
"testing"
"github.com/eslider/go-config/internal/testfixtures"
)
func TestCodec_IdentityJSONFixture(t *testing.T) {
c := New(WithBytes(testfixtures.Load(t, "identity", "service.json")))
m, err := c.Map(context.Background())
if err != nil {
t.Fatal(err)
}
if m["service"].(map[string]any)["name"] != "my-service" {
t.Fatalf("%#v", m)
}
}