console/widgets: format (large) communities for last flow widget

This commit is contained in:
Vincent Bernat
2022-10-11 18:16:10 +02:00
parent 954c5d6b7a
commit 1a0f00bbc4
2 changed files with 13 additions and 2 deletions

View File

@@ -24,7 +24,7 @@ func TestWidgetLastFlow(t *testing.T) {
ctrl := gomock.NewController(t)
mockRows := mocks.NewMockRows(ctrl)
mockConn.EXPECT().Query(gomock.Any(),
`SELECT * FROM flows WHERE TimeReceived = (SELECT MAX(TimeReceived) FROM flows) LIMIT 1`).
gomock.Any()).
Return(mockRows, nil)
mockRows.EXPECT().Next().Return(true)
mockRows.EXPECT().Close()