awesominat / stonks

The ideal investment platform
1 stars 0 forks source link

Add testing for dashboard cachestock #201

Closed awesominat closed 10 months ago

awesominat commented 10 months ago

fixes #190

this pr adds 2 tests that:

  1. tests whether dashboard use case can grab the user stats accurately and handle the parsed information from the API correctly
  2. tests whether refreshing by api call returns the correct values and displays them in the correct data structure
  3. tests how the interactor handles invalid tickers
  4. tests if the algorithm for checking the days since last reset works accurately
  5. tests whether calling cache stock information returns the correct map with information from the API
  6. correctly handles an invalid ticker in the portfolio by deleting it

as of testing, this has 100% coverage in the two use cases

gursi26 commented 10 months ago

can fix conflicts pls