From 210407f79f579170d4c4ad92cfe63b24d1e1d751 Mon Sep 17 00:00:00 2001 From: Songmu Date: Mon, 13 Nov 2023 02:26:16 +0900 Subject: [PATCH] update testing --- main_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main_test.go b/main_test.go index b169fce..3c29a19 100644 --- a/main_test.go +++ b/main_test.go @@ -175,9 +175,13 @@ func TestBlogsync(t *testing.T) { if err := os.Chtimes(entryFile, oldTime, oldTime); err != nil { t.Fatal(err) } - if _, err := blogsync("fetch", entryFile); err != nil { + fetchedFile, err := blogsync("fetch", entryFile) + if err != nil { t.Error(err) } + if fetchedFile != entryFile { + t.Errorf("unexpected fetched file: %s", fetchedFile) + } t.Log("When a draft is published, a URL is issued and the file is saved in the corresponding location") publishedFile, err := blogsync("push", "--publish", entryFile)