aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/testhelpers_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/testhelpers_test.go')
-rw-r--r--hugolib/testhelpers_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/hugolib/testhelpers_test.go b/hugolib/testhelpers_test.go
index 6e62a2442..6e00a8ee0 100644
--- a/hugolib/testhelpers_test.go
+++ b/hugolib/testhelpers_test.go
@@ -486,6 +486,8 @@ func (s *sitesBuilder) CreateSitesE() error {
return errors.Wrap(err, "failed to load config")
}
+ s.Fs.Destination = hugofs.NewCreateCountingFs(s.Fs.Destination)
+
depsCfg := s.depsCfg
depsCfg.Fs = s.Fs
depsCfg.Cfg = s.Cfg
@@ -680,6 +682,12 @@ func (s *sitesBuilder) AssertImage(width, height int, filename string) {
s.Assert(cfg.Height, qt.Equals, height)
}
+func (s *sitesBuilder) AssertNoDuplicateWrites() {
+ s.Helper()
+ d := s.Fs.Destination.(hugofs.DuplicatesReporter)
+ s.Assert(d.ReportDuplicates(), qt.Equals, "")
+}
+
func (s *sitesBuilder) FileContent(filename string) string {
s.T.Helper()
filename = filepath.FromSlash(filename)