summaryrefslogtreecommitdiffstats
path: root/hugolib/robotstxt_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/robotstxt_test.go')
-rw-r--r--hugolib/robotstxt_test.go18
1 files changed, 15 insertions, 3 deletions
diff --git a/hugolib/robotstxt_test.go b/hugolib/robotstxt_test.go
index 31f89b847..b0a843a7e 100644
--- a/hugolib/robotstxt_test.go
+++ b/hugolib/robotstxt_test.go
@@ -1,10 +1,22 @@
+// Copyright 2016 The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
package hugolib
import (
"bytes"
"testing"
- "github.com/spf13/afero"
"github.com/spf13/hugo/helpers"
"github.com/spf13/hugo/hugofs"
"github.com/spf13/hugo/source"
@@ -21,7 +33,7 @@ func TestRobotsTXTOutput(t *testing.T) {
viper.Reset()
defer viper.Reset()
- hugofs.DestinationFS = new(afero.MemMapFs)
+ hugofs.InitMemFs()
viper.Set("baseurl", "http://auth/bub/")
@@ -53,7 +65,7 @@ func TestRobotsTXTOutput(t *testing.T) {
t.Fatalf("Unable to RenderRobotsTXT :%s", err)
}
- robotsFile, err := hugofs.DestinationFS.Open("robots.txt")
+ robotsFile, err := hugofs.Destination().Open("robots.txt")
if err != nil {
t.Fatalf("Unable to locate: robots.txt")