[GH-19150] Remove strings in all channel types for constants (#19535)
Automatic Merge
Этот коммит содержится в:
@@ -6626,15 +6626,15 @@ func testChannelStoreAnalyticsDeletedTypeCount(t *testing.T, ss store.Store) {
|
||||
}()
|
||||
|
||||
var openStartCount int64
|
||||
openStartCount, nErr = ss.Channel().AnalyticsDeletedTypeCount("", "O")
|
||||
openStartCount, nErr = ss.Channel().AnalyticsDeletedTypeCount("", model.ChannelTypeOpen)
|
||||
require.NoError(t, nErr, nErr)
|
||||
|
||||
var privateStartCount int64
|
||||
privateStartCount, nErr = ss.Channel().AnalyticsDeletedTypeCount("", "P")
|
||||
privateStartCount, nErr = ss.Channel().AnalyticsDeletedTypeCount("", model.ChannelTypePrivate)
|
||||
require.NoError(t, nErr, nErr)
|
||||
|
||||
var directStartCount int64
|
||||
directStartCount, nErr = ss.Channel().AnalyticsDeletedTypeCount("", "D")
|
||||
directStartCount, nErr = ss.Channel().AnalyticsDeletedTypeCount("", model.ChannelTypeDirect)
|
||||
require.NoError(t, nErr, nErr)
|
||||
|
||||
nErr = ss.Channel().Delete(o1.Id, model.GetMillis())
|
||||
@@ -6648,15 +6648,15 @@ func testChannelStoreAnalyticsDeletedTypeCount(t *testing.T, ss store.Store) {
|
||||
|
||||
var count int64
|
||||
|
||||
count, nErr = ss.Channel().AnalyticsDeletedTypeCount("", "O")
|
||||
count, nErr = ss.Channel().AnalyticsDeletedTypeCount("", model.ChannelTypeOpen)
|
||||
require.NoError(t, err, nErr)
|
||||
assert.Equal(t, openStartCount+2, count, "Wrong open channel deleted count.")
|
||||
|
||||
count, nErr = ss.Channel().AnalyticsDeletedTypeCount("", "P")
|
||||
count, nErr = ss.Channel().AnalyticsDeletedTypeCount("", model.ChannelTypePrivate)
|
||||
require.NoError(t, nErr, nErr)
|
||||
assert.Equal(t, privateStartCount+1, count, "Wrong private channel deleted count.")
|
||||
|
||||
count, nErr = ss.Channel().AnalyticsDeletedTypeCount("", "D")
|
||||
count, nErr = ss.Channel().AnalyticsDeletedTypeCount("", model.ChannelTypeDirect)
|
||||
require.NoError(t, nErr, nErr)
|
||||
assert.Equal(t, directStartCount+1, count, "Wrong direct channel deleted count.")
|
||||
}
|
||||
|
||||
@@ -19,18 +19,18 @@ type ChannelStore struct {
|
||||
}
|
||||
|
||||
// AnalyticsDeletedTypeCount provides a mock function with given fields: teamID, channelType
|
||||
func (_m *ChannelStore) AnalyticsDeletedTypeCount(teamID string, channelType string) (int64, error) {
|
||||
func (_m *ChannelStore) AnalyticsDeletedTypeCount(teamID string, channelType model.ChannelType) (int64, error) {
|
||||
ret := _m.Called(teamID, channelType)
|
||||
|
||||
var r0 int64
|
||||
if rf, ok := ret.Get(0).(func(string, string) int64); ok {
|
||||
if rf, ok := ret.Get(0).(func(string, model.ChannelType) int64); ok {
|
||||
r0 = rf(teamID, channelType)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
if rf, ok := ret.Get(1).(func(string, model.ChannelType) error); ok {
|
||||
r1 = rf(teamID, channelType)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
|
||||
Ссылка в новой задаче
Block a user