The user-analytics API returns monetary values as strings instead of floats, which causes assertion failures in tests. Additionally, the test expects static month-based values, making it unreliable across different months.
Steps to Reproduce:
- Run the test at different times of the year.
- The test expects hardcoded values for Jul and Aug, while Carbon::now()->subMonth() makes the expected values dynamic.
- The API returns amounts as "2000.00" (string) instead of 2000.00 (float), leading to assertion mismatches.
Expected Behavior:
The API should return monetary values as floats to ensure type consistency.
Tests should dynamically determine expected months based on the current date.
Actual Behavior:
The API response includes strings for numerical values.
The test fails when run in a different month due to hardcoded expectations.