Skip to content

Commit

Permalink
add TestDeleteDirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
milwad-dev committed Sep 24, 2024
1 parent 6c0e2c6 commit e2e72c7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions filei_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,14 @@ func TestCleanDirectory(t *testing.T) {
t.Fatal("CleanDirectory() error data must have 0 files")
}
}
func TestDeleteDirectory(t *testing.T) {
directory := "testdata/dir2"

defer os.Mkdir(directory, 0755)

err := DeleteDirectory(directory)

if err != nil {
t.Fatalf("DeleteDirectory() error = %v", err)
}
}
Empty file added testdata/dir2/.gitkeep
Empty file.

0 comments on commit e2e72c7

Please # to comment.