Skip to content
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

Backend [Integration Test] organizations.go handlers GetOrganizationBounties, GetOrganizationBudget, & GetOrganizationBudgetHistory #1510

Closed
5 tasks
elraphty opened this issue Feb 13, 2024 · 2 comments · Fixed by #1522
Assignees
Milestone

Comments

@elraphty
Copy link
Contributor

Context

We are trying to increase the test coverage for our Golang backend.

Design

Write tests for the organization handlers, the test should:

  • Should test that an organization's bounties can be listed without authentication
  • Should test that an empty array is returned when the wrong organization uuid is passed
  • Should test that a 401 is returned when trying to view an organization's budget without a token
  • Should test that a 401 is returned when trying to view an organization's budget history without a token
  • Should test that the right organization budget is returned, if the user is the organization admin or has the ViewReport role
  • Should test that the right budget history is returned, if the user is the organization admin or has the ViewReport role

Organizations Handlers To Test

GetOrganizationBounties
GetOrganizationBudget
GetOrganizationBudgetHistory

Add tests to organization_test.go

Acceptance Criteria

We are trying to test that all tests pass

  • I've tested on Chrome
  • I've submitted a screenshot or recording in my pr
  • I've created a unit test that
  • I've created tests with the appropriate data and they all pass
  • I've tested that tests with the wrong data fails

Here is an example backend test

@AbdulWahab3181
Copy link
Contributor

@ecurrencyhodler I would like to give this a try. Could you please assign it to me?

@ecurrencyhodler
Copy link
Contributor

okay let's get a PR up in 1-2 days!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment