Skip to content

Commit

Permalink
Merge pull request #866 from slack-go/fix-conversatoins-mark-test
Browse files Browse the repository at this point in the history
Fix test for conversations.mark
  • Loading branch information
kanata2 authored Dec 10, 2020
2 parents 106d33d + f271776 commit 177377b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions conversation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,15 @@ func TestGetConversationHistory(t *testing.T) {
}
}

func markConversationHandler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
response, _ := json.Marshal(GetConversationHistoryResponse{
SlackResponse: SlackResponse{Ok: true}})
w.Write(response)
}

func TestMarkConversation(t *testing.T) {
http.HandleFunc("/conversations.mark", markConversationHandler)
once.Do(startServer)
api := New("testing-token", OptionAPIURL("http://"+serverAddr+"/"))
err := api.MarkConversation("CXXXXXXXX", "1401383885.000061")
Expand Down

0 comments on commit 177377b

Please sign in to comment.