summaryrefslogtreecommitdiffstats
path: root/app/file_test.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-11-16 15:04:27 -0600
committerJonathan <jonfritz@gmail.com>2017-11-16 16:04:27 -0500
commiteb1a00ef5f93b19c2d49b26de057ee2c51c09e45 (patch)
treee63afa695283e15c5cd9ee2a437d74024dcc5c20 /app/file_test.go
parentef69d93abfb192bc7a2416f3cf2622d99fd27dd5 (diff)
downloadchat-eb1a00ef5f93b19c2d49b26de057ee2c51c09e45.tar.gz
chat-eb1a00ef5f93b19c2d49b26de057ee2c51c09e45.tar.bz2
chat-eb1a00ef5f93b19c2d49b26de057ee2c51c09e45.zip
Reorganize file util functionality (#7848)
* reorganize file util functionality * fix api test compilation * fix rebase issue
Diffstat (limited to 'app/file_test.go')
-rw-r--r--app/file_test.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/app/file_test.go b/app/file_test.go
index d86272063..204113782 100644
--- a/app/file_test.go
+++ b/app/file_test.go
@@ -9,7 +9,6 @@ import (
"time"
"github.com/mattermost/mattermost-server/model"
- "github.com/mattermost/mattermost-server/utils"
)
func TestGeneratePublicLinkHash(t *testing.T) {
@@ -51,7 +50,7 @@ func TestDoUploadFile(t *testing.T) {
} else {
defer func() {
<-th.App.Srv.Store.FileInfo().PermanentDelete(info1.Id)
- utils.RemoveFile(info1.Path)
+ th.App.RemoveFile(info1.Path)
}()
}
@@ -65,7 +64,7 @@ func TestDoUploadFile(t *testing.T) {
} else {
defer func() {
<-th.App.Srv.Store.FileInfo().PermanentDelete(info2.Id)
- utils.RemoveFile(info2.Path)
+ th.App.RemoveFile(info2.Path)
}()
}
@@ -79,7 +78,7 @@ func TestDoUploadFile(t *testing.T) {
} else {
defer func() {
<-th.App.Srv.Store.FileInfo().PermanentDelete(info3.Id)
- utils.RemoveFile(info3.Path)
+ th.App.RemoveFile(info3.Path)
}()
}
@@ -93,7 +92,7 @@ func TestDoUploadFile(t *testing.T) {
} else {
defer func() {
<-th.App.Srv.Store.FileInfo().PermanentDelete(info3.Id)
- utils.RemoveFile(info3.Path)
+ th.App.RemoveFile(info3.Path)
}()
}