Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Josh Soref
2022-02-28 04:31:00 -05:00
коммит произвёл GitHub
родитель a22bc8fd96
Коммит 5d85417a8b
42 изменённых файлов: 101 добавлений и 101 удалений

Просмотреть файл

@@ -243,7 +243,7 @@ func testChannelStoreSaveDirectChannel(t *testing.T, ss store.Store, s SqlStore)
require.Len(t, members, 2, "should have saved 2 members")
_, nErr = ss.Channel().SaveDirectChannel(&o1, &m1, &m2)
require.Error(t, nErr, "shoudn't be a able to update from save")
require.Error(t, nErr, "shouldn't be a able to update from save")
// Attempt to save a direct channel that already exists
o1a := model.Channel{
@@ -535,7 +535,7 @@ func testChannelStoreGetChannelsByIds(t *testing.T, ss store.Store) {
t.Run("Get 2 existing channels", func(t *testing.T) {
r1, err := ss.Channel().GetChannelsByIds([]string{o1.Id, o2.Id}, false)
require.NoError(t, err, err)
require.Len(t, r1, 2, "invalid returned channels, exepected 2 and got "+strconv.Itoa(len(r1)))
require.Len(t, r1, 2, "invalid returned channels, expected 2 and got "+strconv.Itoa(len(r1)))
require.Equal(t, channelToJSON(t, &o1), channelToJSON(t, r1[0]))
require.Equal(t, channelToJSON(t, &o2), channelToJSON(t, r1[1]))
})
@@ -551,7 +551,7 @@ func testChannelStoreGetChannelsByIds(t *testing.T, ss store.Store) {
t.Run("Get 2 existing and 1 deleted channel", func(t *testing.T) {
r1, err := ss.Channel().GetChannelsByIds([]string{o1.Id, o2.Id, o3.Id}, true)
require.NoError(t, err, err)
require.Len(t, r1, 3, "invalid returned channels, exepected 3 and got "+strconv.Itoa(len(r1)))
require.Len(t, r1, 3, "invalid returned channels, expected 3 and got "+strconv.Itoa(len(r1)))
require.Equal(t, channelToJSON(t, &o1), channelToJSON(t, r1[0]))
require.Equal(t, channelToJSON(t, &o2), channelToJSON(t, r1[1]))
require.Equal(t, channelToJSON(t, &o3), channelToJSON(t, r1[2]))
@@ -4881,7 +4881,7 @@ func testGetMember(t *testing.T, ss store.Store) {
require.Equal(t, userId, member.UserId, "should've have gotten member for user")
member, err = ss.Channel().GetMember(context.Background(), c2.Id, userId)
require.NoError(t, err, "should'nt have errored when getting member", err)
require.NoError(t, err, "shouldn't have errored when getting member", err)
require.Equal(t, c2.Id, member.ChannelId, "should've gotten member of channel 2")
require.Equal(t, userId, member.UserId, "should've gotten member for user")

Просмотреть файл

@@ -819,7 +819,7 @@ func testGetSidebarCategory(t *testing.T, ss store.Store, s SqlStore) {
assert.Equal(t, []string{gmChannel.Id}, res2.Channels)
})
t.Run("should return orphaned DM channels in the DMs categorywhich are in a custom category on another team", func(t *testing.T) {
t.Run("should return orphaned DM channels in the DMs category which are in a custom category on another team", func(t *testing.T) {
userId := model.NewId()
teamId := model.NewId()

Просмотреть файл

@@ -278,7 +278,7 @@ func testGetSharedChannels(t *testing.T, ss store.Store) {
}
})
t.Run("Get shared channels invalid pagnation", func(t *testing.T) {
t.Run("Get shared channels invalid pagination", func(t *testing.T) {
opts := model.SharedChannelFilterOpts{
TeamId: team1,
}

Просмотреть файл

@@ -316,7 +316,7 @@ func testTeamStoreSearchAll(t *testing.T, ss store.Store) {
},
{
"Search for open team without results",
&model.TeamSearch{Term: "notexists"},
&model.TeamSearch{Term: "nonexistent"},
0,
[]string{},
},
@@ -483,7 +483,7 @@ func testTeamStoreSearchOpen(t *testing.T, ss store.Store) {
},
{
"Search for open team without results",
"notexists",
"nonexistent",
0,
"",
},
@@ -589,7 +589,7 @@ func testTeamStoreSearchPrivate(t *testing.T, ss store.Store) {
},
{
"Search for private team without results",
"notexists",
"nonexistent",
0,
"",
},