Skip to content

Commit

Permalink
added test for isgraph record
Browse files Browse the repository at this point in the history
  • Loading branch information
kofoworola committed Nov 7, 2023
1 parent cef41a4 commit 0dc5aa6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions analytics/analytics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ func TestAnalyticsRecord_IsGraphRecord(t *testing.T) {
assert.False(t, record.IsGraphRecord())
})

t.Run("should return true when tags contain the graph analytics tag", func(t *testing.T) {
t.Run("should return true with graph stats", func(t *testing.T) {
record := AnalyticsRecord{
Tags: []string{"tag_1", "tag_2", PredefinedTagGraphAnalytics, "tag_4", "tag_5"},
GraphQLStats: GraphQLStats{
IsGraphQL: true,
},
}
assert.True(t, record.IsGraphRecord())
})
Expand Down

0 comments on commit 0dc5aa6

Please sign in to comment.