diff options
Diffstat (limited to 'resource/testhelpers_test.go')
-rw-r--r-- | resource/testhelpers_test.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/resource/testhelpers_test.go b/resource/testhelpers_test.go index 7ab210688..668885682 100644 --- a/resource/testhelpers_test.go +++ b/resource/testhelpers_test.go @@ -18,12 +18,17 @@ import ( ) func newTestResourceSpec(assert *require.Assertions) *Spec { + return newTestResourceSpecForBaseURL(assert, "https://example.com/") +} + +func newTestResourceSpecForBaseURL(assert *require.Assertions, baseURL string) *Spec { cfg := viper.New() - cfg.Set("baseURL", "https://example.com/") + cfg.Set("baseURL", baseURL) cfg.Set("resourceDir", "/res") fs := hugofs.NewMem(cfg) s, err := helpers.NewPathSpec(fs, cfg) + assert.NoError(err) spec, err := NewSpec(s, media.DefaultTypes) |