Adapt DirectoryIsEmpty test to create and delete empty directory
This commit is contained in:
parent
8f52e57d9c
commit
5bc213f6f2
1 changed files with 3 additions and 1 deletions
|
@ -51,7 +51,9 @@ func TestDirectoryIsEmpty(t *testing.T) {
|
|||
t.Run("not existing path", func(t *testing.T) {
|
||||
assert.Equal(t, false, DirectoryIsEmpty("./xxx"))
|
||||
})
|
||||
t.Run("photo-lover", func(t *testing.T) {
|
||||
t.Run("empty path", func(t *testing.T) {
|
||||
os.Mkdir("./testdata/emptyDir", 0777)
|
||||
defer os.RemoveAll("./testdata/emptyDir")
|
||||
assert.Equal(t, true, DirectoryIsEmpty("./testdata/emptyDir"))
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue