As a Developer,
I want to write unit tests to verify the subscription logic, so that I can ensure that investors cannot subscribe to fully funded projects.
Technical Task:
Write unit tests:
Create unit tests that verify the following:
Investors can subscribe to projects that are not yet fully funded.
Investors are blocked from subscribing to fully funded projects.
The total funding is correctly calculated after each subscription.
Only authenticated investors can create subscriptions.
Notes:
Use Django’s TestCase class and DRF’s APIClient to simulate API calls and assert the behavior of the subscription system.
Acceptance Criteria:
All test cases pass and verify the proper functionality of the subscription system, including funding validation, permissions, and business logic.
Unit Tests for Subscription Logic
As a Developer,
I want to write unit tests to verify the subscription logic,
so that I can ensure that investors cannot subscribe to fully funded projects.
Technical Task:
Write unit tests:
Notes:
TestCase
class and DRF’sAPIClient
to simulate API calls and assert the behavior of the subscription system.Acceptance Criteria:
US #56