Skip to content

Commit

Permalink
chore: test conversation id
Browse files Browse the repository at this point in the history
  • Loading branch information
toanppp committed Apr 3, 2024
1 parent daec11e commit a499773
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions freshchat/conversation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
"github.com/toanppp/freshgo/freshchat"
)

var conversationID string

func TestFreshchat_CreateConversation(t *testing.T) {
f := freshchat.New(url, accessToken)
resp, err := f.CreateConversation(context.Background(), freshchat.Conversation{
Expand Down Expand Up @@ -35,6 +37,7 @@ func TestFreshchat_CreateConversation(t *testing.T) {
if err != nil {
t.Fatalf("an error occurred: %v", err)
}
conversationID = resp.ConversationID
fmt.Printf("%+v\n", resp)
}

Expand Down
7 changes: 3 additions & 4 deletions freshchat/freshchat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ var (
url = os.Getenv("FRESHCHAT_URL")
accessToken = os.Getenv("FRESHCHAT_ACCESS_TOKEN")

userID = os.Getenv("FRESHCHAT_USER_ID")
agentID = os.Getenv("FRESHCHAT_AGENT_ID")
channelID = os.Getenv("FRESHCHAT_CHANNEL_ID")
conversationID = os.Getenv("FRESHCHAT_CONVERSATION_ID")
userID = os.Getenv("FRESHCHAT_USER_ID")
agentID = os.Getenv("FRESHCHAT_AGENT_ID")
channelID = os.Getenv("FRESHCHAT_CHANNEL_ID")
)

0 comments on commit a499773

Please sign in to comment.