Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
totalimmersion committed Oct 28, 2024
1 parent 97192ee commit bb36029
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions message_history_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestMessageHistory(t *testing.T) {
initialText := "initial text"
customField := "custom_field"
initialCustomFieldValue := "custom value"
// send a message with initial text
// send a message with initial text (user1)
response, err := ch.SendMessage(ctx, &Message{Text: initialText, ExtraData: map[string]interface{}{customField: initialCustomFieldValue}}, user1.ID)
require.NoError(t, err)
message := response.Message
Expand Down Expand Up @@ -56,7 +56,7 @@ func TestMessageHistory(t *testing.T) {

secondUpdate := history[0]
assert.Equal(t, updatedText1, secondUpdate.Text)
assert.Equal(t, user2.ID, secondUpdate.MessageUpdatedByID)
assert.Equal(t, user1.ID, secondUpdate.MessageUpdatedByID)
assert.Equal(t, updatedCustomFieldValue, secondUpdate.ExtraData[customField].(string))
})

Expand Down Expand Up @@ -85,6 +85,6 @@ func TestMessageHistory(t *testing.T) {

secondUpdate := sortedHistory[1]
assert.Equal(t, updatedText1, secondUpdate.Text)
assert.Equal(t, user2.ID, secondUpdate.MessageUpdatedByID)
assert.Equal(t, user1.ID, secondUpdate.MessageUpdatedByID)
})
}

0 comments on commit bb36029

Please sign in to comment.