Fix flaky test introduced in #24602 (#25236)

This commit is contained in:
Daniel Espino García 2023-11-01 11:23:56 +01:00 committed by GitHub
parent da43d75e78
commit b0dc74957a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -513,7 +513,7 @@ func TestUpdatePostPluginHooks(t *testing.T) {
}
func (p *MyPlugin) MessageWillBeUpdated(c *plugin.Context, newPost, oldPost *model.Post) (*model.Post, string) {
newPost.Message = newPost.Message + " 2"
newPost.Message = "2 " + newPost.Message
return newPost, ""
}
@ -541,7 +541,7 @@ func TestUpdatePostPluginHooks(t *testing.T) {
updatedPost, err := th.App.UpdatePost(th.Context, post, false)
require.Nil(t, err)
require.NotNil(t, updatedPost)
require.Equal(t, "new message 1 2", updatedPost.Message)
require.Equal(t, "2 new message 1", updatedPost.Message)
})
}