spelling: strings (#19542)
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com> Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
@@ -90,7 +90,7 @@ var searchFileInfoStoreTests = []searchTest{
|
||||
Tags: []string{EngineAll},
|
||||
},
|
||||
{
|
||||
Name: "Should be able to exclude messages that contain a serch term",
|
||||
Name: "Should be able to exclude messages that contain a search term",
|
||||
Fn: testFileInfoFilterFilesWithATerm,
|
||||
Tags: []string{EngineMySql, EnginePostgres},
|
||||
},
|
||||
|
||||
@@ -90,7 +90,7 @@ var searchPostStoreTests = []searchTest{
|
||||
Tags: []string{EngineAll},
|
||||
},
|
||||
{
|
||||
Name: "Should be able to exclude messages that contain a serch term",
|
||||
Name: "Should be able to exclude messages that contain a search term",
|
||||
Fn: testFilterMessagesWithATerm,
|
||||
Tags: []string{EngineMySql, EnginePostgres},
|
||||
},
|
||||
@@ -152,7 +152,7 @@ var searchPostStoreTests = []searchTest{
|
||||
},
|
||||
{
|
||||
Name: "Should support searching for multiple hashtags",
|
||||
Fn: testSearcWithMultipleHashtags,
|
||||
Fn: testSearchWithMultipleHashtags,
|
||||
Tags: []string{EngineElasticSearch},
|
||||
},
|
||||
{
|
||||
@@ -187,7 +187,7 @@ var searchPostStoreTests = []searchTest{
|
||||
},
|
||||
{
|
||||
Name: "Should not return system messages",
|
||||
Fn: testSearchShouldExcludeSytemMessages,
|
||||
Fn: testSearchShouldExcludeSystemMessages,
|
||||
Tags: []string{EngineAll},
|
||||
},
|
||||
{
|
||||
@@ -1225,7 +1225,7 @@ func testSearchHashtagWithMarkdown(t *testing.T, th *SearchTestHelper) {
|
||||
th.checkPostInSearchResults(t, p5.Id, results.Posts)
|
||||
}
|
||||
|
||||
func testSearcWithMultipleHashtags(t *testing.T, th *SearchTestHelper) {
|
||||
func testSearchWithMultipleHashtags(t *testing.T, th *SearchTestHelper) {
|
||||
p1, err := th.createPost(th.User.Id, th.ChannelBasic.Id, "searching hashtag #hashtag", "#hashtwo #hashone", model.PostTypeDefault, 0, false)
|
||||
require.NoError(t, err)
|
||||
p2, err := th.createPost(th.User.Id, th.ChannelBasic.Id, "searching term with `#hashtag`", "#hashtwo #hashthree", model.PostTypeDefault, 0, false)
|
||||
@@ -1399,7 +1399,7 @@ func testSearchHashtagWithUnderscores(t *testing.T, th *SearchTestHelper) {
|
||||
th.checkPostInSearchResults(t, p1.Id, results.Posts)
|
||||
}
|
||||
|
||||
func testSearchShouldExcludeSytemMessages(t *testing.T, th *SearchTestHelper) {
|
||||
func testSearchShouldExcludeSystemMessages(t *testing.T, th *SearchTestHelper) {
|
||||
_, err := th.createPost(th.User.Id, th.ChannelBasic.Id, "test system message one", "", model.PostTypeJoinChannel, 0, false)
|
||||
require.NoError(t, err)
|
||||
_, err = th.createPost(th.User.Id, th.ChannelBasic.Id, "test system message two", "", model.PostTypeLeaveChannel, 0, false)
|
||||
|
||||
@@ -114,7 +114,7 @@ var searchUserStoreTests = []searchTest{
|
||||
},
|
||||
{
|
||||
Name: "Should support one or two character usernames and first/last names in search",
|
||||
Fn: testSearchOneTwoCharUsersnameAndFirstLastNames,
|
||||
Fn: testSearchOneTwoCharUsernamesAndFirstLastNames,
|
||||
Tags: []string{EngineAll},
|
||||
},
|
||||
{
|
||||
@@ -687,7 +687,7 @@ func testSearchUsersShouldBeCaseInsensitive(t *testing.T, th *SearchTestHelper)
|
||||
th.assertUsersMatchInAnyOrder(t, []*model.User{th.User2}, users.OutOfChannel)
|
||||
}
|
||||
|
||||
func testSearchOneTwoCharUsersnameAndFirstLastNames(t *testing.T, th *SearchTestHelper) {
|
||||
func testSearchOneTwoCharUsernamesAndFirstLastNames(t *testing.T, th *SearchTestHelper) {
|
||||
userAlternate, err := th.createUser("ho", "alternatenickname", "zi", "k")
|
||||
require.NoError(t, err)
|
||||
|
||||
|
||||
@@ -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,
|
||||
"",
|
||||
},
|
||||
|
||||
Ссылка в новой задаче
Block a user