Skip to content

Commit 5642a1b

Browse files
committed
cleanup
1 parent bc37424 commit 5642a1b

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

pkg/http/sse_test.go

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -48,33 +48,6 @@ func TestSSE(t *testing.T) {
4848
postsRepository: postsRepositoryMock{},
4949
})
5050

51-
postStreamAdapterFunc := http.NewOneModelStreamAdapter(
52-
func(r *netHTTP.Request) (response Post, err error) {
53-
postID := chi.URLParam(r, "id")
54-
55-
post, err := postsRepositoryMock{}.ByID(postID)
56-
if err != nil {
57-
return Post{}, err
58-
}
59-
60-
return post, nil
61-
},
62-
func(r *netHTTP.Request, msg *message.Message) (ok bool) {
63-
postUpdated := PostUpdated{}
64-
65-
err := json.Unmarshal(msg.Payload, &postUpdated)
66-
if err != nil {
67-
return false
68-
}
69-
70-
postID := chi.URLParam(r, "id")
71-
72-
return postUpdated.ID == postID
73-
},
74-
)
75-
76-
_ = postStreamAdapterFunc
77-
7851
ctx, cancel := context.WithCancel(context.Background())
7952
defer cancel()
8053

0 commit comments

Comments
 (0)