Skip to content

fix: /projects endpoint returning null instead of empty array #140

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 7 commits into from
Feb 9, 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
Next Next commit
Update test to verify return value is non-nil
  • Loading branch information
bryphe-coder committed Feb 2, 2022
commit ec3c24399cc5589a577c9b5bff8924ba3bbd4d84
2 changes: 2 additions & 0 deletions coderd/projects_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func TestProjects(t *testing.T) {
_ = server.RandomInitialUser(t)
projects, err := server.Client.Projects(context.Background(), "")
require.NoError(t, err)
require.NotNil(t, projects)
require.Len(t, projects, 0)
})

Expand Down Expand Up @@ -77,6 +78,7 @@ func TestProjects(t *testing.T) {

projects, err := server.Client.Projects(context.Background(), user.Organization)
require.NoError(t, err)
require.NotNil(t, projects)
require.Len(t, projects, 0)
})

Expand Down