-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests were failing since the shallow-render library was automatically stubbing out our mock (which we didn't want to do!). To fix this, add a `dontMock` call to AccountService and use a provider instead. Since these tests are being modified, refactor them a bit. Split the "update account after submiting the form" into two tests for each of the spies and assertions, and delete the "should format in MB" delete since all it was testing was that our mocks were being properly injected into the component; something that is tested in the rest of our tests. Also replace the usage of the `spyOn` function with built in functionality of our testing doubles. We already have a mocked/stubbed out version of both ApiService and AccountService for these tests, so it's a bit unusual to create a spy of an already existing testing double. Convert the mock objects to classes that are instantiated in the beforeEach block so that tests have direct access to the whole objects and they are reset for each test. PER-9349: Storage Redeemed Does Not Show In Storage Bar
- Loading branch information
1 parent
e6d9d2e
commit b96f0e7
Showing
1 changed file
with
38 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters