Skip to content

Commit

Permalink
Merge pull request #76 from is2ei/improve-coverage
Browse files Browse the repository at this point in the history
Improved coverage v2/topics.go
  • Loading branch information
Horie Issei #hashtagtest committed Dec 25, 2019
2 parents 8494d0c + 5f85550 commit 5d66fb7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions typetalk/v2/topics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ func Test_TopicsService_GetMyTopics_should_get_some_topics(t *testing.T) {
}
}

func Test_TopicsService_GetMyTopics_errorResponse(t *testing.T) {
_, _, err := client.Topics.GetMyTopics(context.Background(), "qwerty")
if err == nil {
t.Errorf("Expected error to be returned")
}
}

func Test_MessagesService_GetMyDirectMessageTopics_should_get_some_direct_message_topics(t *testing.T) {
setup()
defer teardown()
Expand All @@ -63,3 +70,10 @@ func Test_MessagesService_GetMyDirectMessageTopics_should_get_some_direct_messag
t.Errorf("Returned result:\n result %v,\n want %v", result, want)
}
}

func Test_MessagesService_GetMyDirectMessageTopics_errorResponse(t *testing.T) {
_, _, err := client.Messages.GetMyDirectMessageTopics(context.Background(), "qwerty")
if err == nil {
t.Errorf("Expected error to be returned")
}
}

0 comments on commit 5d66fb7

Please sign in to comment.