summaryrefslogtreecommitdiffstats
path: root/hugofs/fs_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-04-02 01:23:12 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-04-02 01:23:12 +0200
commitc6c2c689d602cf9d0a9bdf016e3a51a54030b072 (patch)
tree723671971b0abca9a607bd8929ee0ef9b207f046 /hugofs/fs_test.go
parentb678e90db74edc4f8d5502c1a367db5cec58e0c5 (diff)
hugofs: Add missing not nil checks to tests
Diffstat (limited to 'hugofs/fs_test.go')
-rw-r--r--hugofs/fs_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/hugofs/fs_test.go b/hugofs/fs_test.go
index 06d63a78f..8a68039f7 100644
--- a/hugofs/fs_test.go
+++ b/hugofs/fs_test.go
@@ -26,8 +26,11 @@ func TestInitDefault(t *testing.T) {
InitDefaultFs()
+ assert.NotNil(t, Source())
assert.IsType(t, new(afero.OsFs), Source())
+ assert.NotNil(t, Destination())
assert.IsType(t, new(afero.OsFs), Destination())
+ assert.NotNil(t, Os())
assert.IsType(t, new(afero.OsFs), Os())
assert.Nil(t, WorkingDir())
}
@@ -38,7 +41,9 @@ func TestInitMemFs(t *testing.T) {
InitMemFs()
+ assert.NotNil(t, Source())
assert.IsType(t, new(afero.MemMapFs), Source())
+ assert.NotNil(t, Destination())
assert.IsType(t, new(afero.MemMapFs), Destination())
assert.IsType(t, new(afero.OsFs), Os())
assert.Nil(t, WorkingDir())
@@ -49,6 +54,7 @@ func TestSetSource(t *testing.T) {
InitMemFs()
SetSource(new(afero.OsFs))
+ assert.NotNil(t, Source())
assert.IsType(t, new(afero.OsFs), Source())
}
@@ -57,6 +63,7 @@ func TestSetDestination(t *testing.T) {
InitMemFs()
SetDestination(new(afero.OsFs))
+ assert.NotNil(t, Destination())
assert.IsType(t, new(afero.OsFs), Destination())
}
@@ -68,5 +75,6 @@ func TestWorkingDir(t *testing.T) {
InitMemFs()
+ assert.NotNil(t, WorkingDir())
assert.IsType(t, new(afero.BasePathFs), WorkingDir())
}