Skip to content

Commit

Permalink
MM-14897: Fix bad merge and update to commands.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkraft committed May 10, 2019
1 parent 5158992 commit ea0fa6b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 35 deletions.
1 change: 0 additions & 1 deletion api4/group_test.go
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/stretchr/testify/require"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/mattermost/mattermost-server/model"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/mattermost/commands/group.go
Expand Up @@ -128,7 +128,7 @@ func channelGroupEnableCmdF(command *cobra.Command, args []string) error {
return errors.New("Unable to find channel '" + args[0] + "'")
}

groups, appErr := a.GetGroupsByChannel(channel.Id, 0, 9999)
groups, _, appErr := a.GetGroupsByChannel(channel.Id, model.GroupSearchOpts{})
if appErr != nil {
return appErr
}
Expand Down Expand Up @@ -198,7 +198,7 @@ func channelGroupListCmdF(command *cobra.Command, args []string) error {
return errors.New("Unable to find channel '" + args[0] + "'")
}

groups, appErr := a.GetGroupsByChannel(channel.Id, 0, 9999)
groups, _, appErr := a.GetGroupsByChannel(channel.Id, model.GroupSearchOpts{})
if appErr != nil {
return appErr
}
Expand Down
32 changes: 0 additions & 32 deletions store/storetest/group_supplier.go
Expand Up @@ -2211,38 +2211,6 @@ func testGetGroups(t *testing.T, ss store.Store) {
return true
},
},
{
Name: "Get group matching name",
TeamId: team1.Id,
Opts: model.GroupSearchOpts{Q: string([]rune(group1.Name)[2:10])}, // very low change of a name collision
Page: 0,
PerPage: 100,
Result: []*model.Group{group1},
},
{
Name: "Get group matching display name",
TeamId: team1.Id,
Opts: model.GroupSearchOpts{Q: "rouP-1"},
Page: 0,
PerPage: 100,
Result: []*model.Group{group1},
},
{
Name: "Get group matching multiple display names",
TeamId: team1.Id,
Opts: model.GroupSearchOpts{Q: "roUp-"},
Page: 0,
PerPage: 100,
Result: []*model.Group{group1, group2},
},
{
Name: "Include member counts",
TeamId: team1.Id,
Opts: model.GroupSearchOpts{IncludeMemberCount: true},
Page: 0,
PerPage: 2,
Result: []*model.Group{&group1WithMemberCount, &group2WithMemberCount},
},
}

for _, tc := range testCases {
Expand Down

0 comments on commit ea0fa6b

Please sign in to comment.