test
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestCopyFileExist(t *testing.T){
|
||||
func TestCopyFileExist(t *testing.T) {
|
||||
src := filepath.Join(TEST_SRC_DIR, "fichier1")
|
||||
dest := filepath.Join(TEST_DEST_DIR, "fichier1")
|
||||
|
||||
@@ -45,3 +45,13 @@ func TestCopyErrSrcWrite(t *testing.T) {
|
||||
|
||||
assert.NotNilf(t, err, "CopyFile error %s", src)
|
||||
}
|
||||
|
||||
func TestCopyContentFile(t *testing.T) {
|
||||
content := "TestCopyContentFileExist"
|
||||
dest := filepath.Join(TEST_DEST_DIR, "fichier1")
|
||||
|
||||
err := CopyContentFile(content, dest)
|
||||
|
||||
assert.Nilf(t, err, "error message")
|
||||
assert.FileExists(t, dest, "CopyFile error")
|
||||
}
|
||||
|
Reference in New Issue
Block a user