From 7ed279d75b7b054e973ea939d57ad3e27af5cd19 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Fri, 27 Feb 2015 14:44:03 +1100 Subject: [PATCH] HelloFSTest.ReadDir_NonExistent --- samples/hello_fs_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/samples/hello_fs_test.go b/samples/hello_fs_test.go index 5d9750d..8f8df33 100644 --- a/samples/hello_fs_test.go +++ b/samples/hello_fs_test.go @@ -15,6 +15,7 @@ import ( "github.com/jacobsa/fuse" "github.com/jacobsa/fuse/samples" "github.com/jacobsa/gcsfuse/timeutil" + . "github.com/jacobsa/oglematchers" . "github.com/jacobsa/ogletest" "golang.org/x/net/context" ) @@ -130,7 +131,10 @@ func (t *HelloFSTest) ReadDir_Dir() { } func (t *HelloFSTest) ReadDir_NonExistent() { - AssertTrue(false, "TODO") + _, err := ioutil.ReadDir(path.Join(t.mfs.Dir(), "foobar")) + + AssertNe(nil, err) + ExpectThat(err, Error(HasSubstr("no such file"))) } func (t *HelloFSTest) Stat_Hello() {