8000 feat: Workspace filters case insensitive by Emyrk · Pull Request #2646 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: Workspace filters case insensitive #2646

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 25, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add newline to shorten long line
  • Loading branch information
Emyrk committed Jun 24, 2022
commit f36ccfa070e2544d4696757d9be95caded26c08f
3 changes: 2 additions & 1 deletion coderd/workspaces_test.go
62D8
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,8 @@ func TestWorkspaceFilter(t *testing.T) {
FilterQuery: allWorkspaces[5].Owner.Username + "/" + strings.ToUpper(allWorkspaces[5].Workspace.Name),
},
FilterF: func(f codersdk.WorkspaceFilter, workspace madeWorkspace) bool {
if strings.EqualFold(workspace.Owner.Username, allWorkspaces[5].Owner.Username) && strings.Contains(strings.ToLower(workspace.Workspace.Name), strings.ToLower(allWorkspaces[5].Workspace.Name)) {
if strings.EqualFold(workspace.Owner.Username, allWorkspaces[5].Owner.Username) &&
strings.Contains(strings.ToLower(workspace.Workspace.Name), strings.ToLower(allWorkspaces[5].Workspace.Name)) {
return true
}

Expand Down
0