You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are trying to increase the test coverage for our Golang backend.
File to to test
handlers/bounty.go
Design
Write tests for the bounty handlers, the test should:
Should test that a 401 error is returned if a user is unauthorized
Mock a call to relay GET /invoice?payment_request=${paymentRequest} to get the status of the invoice
If there is an invoice error a 403 status error should be returned
If the invoice is settled and the invoice.Type is equal to BUDGET the invoice amount should be added to the organization budget and the payment status of the related invoice should be sent to true on the payment history table.
Bounty Handlers To Test
PollInvoice
Add tests to bounty_test.go
Acceptance Criteria
I have rebased and tested locally before submitting my PR
I can submit a PR within 2 days of taking the bounty
Context
We are trying to increase the test coverage for our Golang backend.
File to to test
handlers/bounty.go
Design
Write tests for the bounty handlers, the test should:
/invoice?payment_request=${paymentRequest}
to get the status of the invoiceinvoice.Type
is equal toBUDGET
the invoice amount should be added to the organization budget and the payment status of the related invoice should be sent to true on the payment history table.Bounty Handlers To Test
Add tests to
bounty_test.go
Acceptance Criteria
References
Here is an example backend test
The text was updated successfully, but these errors were encountered: