Skip to content

Commit 08cb4d2

Browse files
committed
Исправил ошибку из-за которой тест posts_create_empty не отправлял команду на создание постов #26
1 parent ff559e8 commit 08cb4d2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/check_posts_create.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,14 @@ func CheckPostCreateSameTime(c *client.Forum, f *Factory, m *Modify) {
217217

218218
func CheckPostCreateEmpty(c *client.Forum, f *Factory, m *Modify) {
219219
thread := f.CreateThread(c, nil, nil, nil)
220-
if m.Bool() {
221-
thread.Slug = ""
222-
}
223220
f.CreatePosts(c, []*models.Post{}, thread)
221+
222+
_, err := c.Operations.PostsCreate(operations.NewPostsCreateParams().
223+
WithSlugOrID(m.SlugOrId(thread)).
224+
WithPosts([]*models.Post{}).
225+
WithContext(Expected(201, &models.Posts{}, nil)))
226+
227+
CheckNil(err)
224228
}
225229

226230
func CheckPostCreateNoThread(c *client.Forum, f *Factory, m *Modify) {

0 commit comments

Comments
 (0)