More tests

This commit is contained in:
Deluan
2020-04-09 13:36:05 -04:00
parent 2d39a6df8d
commit c2ec142ce3
+6 -3
View File
@@ -20,11 +20,14 @@ var _ = Describe("File Caches", func() {
Describe("newFileCache", func() { Describe("newFileCache", func() {
It("creates the cache folder", func() { It("creates the cache folder", func() {
_, err := newFileCache("test", "1kb", "test", 10) Expect(newFileCache("test", "1k", "test", 10)).ToNot(BeNil())
Expect(err).To(BeNil())
_, err = os.Stat(filepath.Join(conf.Server.DataFolder, "test")) _, err := os.Stat(filepath.Join(conf.Server.DataFolder, "test"))
Expect(os.IsNotExist(err)).To(BeFalse()) Expect(os.IsNotExist(err)).To(BeFalse())
}) })
It("creates the cache folder with invalid size", func() {
Expect(newFileCache("test", "abc", "test", 10)).ToNot(BeNil())
})
}) })
}) })