[MM-22133] Allow exporting and importing archived channels (#23724)
Этот коммит содержится в:
@@ -704,6 +704,21 @@ func TestImportImportChannel(t *testing.T) {
|
||||
assert.Equal(t, *data.Header, channel.Header)
|
||||
assert.Equal(t, *data.Purpose, channel.Purpose)
|
||||
assert.Equal(t, scheme2.Id, *channel.SchemeId)
|
||||
|
||||
// Do a valid archived channel.
|
||||
now := model.GetMillis()
|
||||
data.Name = ptrStr("archivedchannel")
|
||||
data.DisplayName = ptrStr("Archived Channel")
|
||||
data.Type = &chanOpen
|
||||
data.Header = ptrStr("Archived Channel Header")
|
||||
data.Purpose = ptrStr("Archived Channel Purpose")
|
||||
data.Scheme = &scheme1.Name
|
||||
data.DeletedAt = &now
|
||||
err = th.App.importChannel(th.Context, &data, false)
|
||||
require.Nil(t, err, "Expected success in apply mode")
|
||||
aChan, err := th.App.GetChannelByName(th.Context, *data.Name, team.Id, true)
|
||||
require.Nil(t, err, "Failed to get channel from database.")
|
||||
assert.Equal(t, *data.Name, aChan.Name)
|
||||
}
|
||||
|
||||
func TestImportImportUser(t *testing.T) {
|
||||
|
||||
Ссылка в новой задаче
Block a user