Skip to content

Commit 82771c4

Browse files
committed
minor update to tests
1 parent 794ec9b commit 82771c4

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*.dll
55
*.so
66
*.dylib
7+
paataka
78

89
# Test binary, build with `go test -c`
910
*.test

usecases/publicationServiceImpl_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ func TestPublicationFindAndUpdate(t *testing.T) {
9797
}
9898

9999
// Verify
100-
got := pub.Title
101-
want := publication.Title
100+
got, want := pub.Title, publication.Title
102101
if got != want {
103102
t.Errorf("got '%s' want '%s'", got, want)
104103
}
@@ -182,8 +181,10 @@ func TestFetchPublicationPostsAddAndListAll(t *testing.T) {
182181
}
183182
}
184183

185-
if matches != 3 {
186-
t.Errorf("got '%d' matches, want 3", matches)
184+
// check if all the posts are matching
185+
got, want := matches, len(mockFeedReader.Posts)
186+
if got != want {
187+
t.Errorf("got '%d' mathces, want '%d'", got, want)
187188
}
188189
})
189190
}

0 commit comments

Comments
 (0)