Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Add missing unit tests for Auth module Hooks #7825

Closed
Tracked by #7208
bobanm opened this issue Nov 29, 2022 · 0 comments · Fixed by #7913
Closed
Tracked by #7208

Add missing unit tests for Auth module Hooks #7825

bobanm opened this issue Nov 29, 2022 · 0 comments · Fixed by #7913
Assignees
Milestone

Comments

@bobanm
Copy link
Contributor

bobanm commented Nov 29, 2022

beforeCommandExecute()

  • Add new test: should initialize account with default values when the account is not in Auth Store
  • [Fixed in #Auth module improvements #7864] Improve the existing test: should initialize senderAccount with default values when there is no sender account in AUTH store. Currently the test:
    - only asserts nonce, instead of all 4 account properties
    - contains test data with invalid setup: 4 keys and 5 required signatures
@bobanm bobanm self-assigned this Nov 30, 2022
@Madhulearn Madhulearn moved this to Backlog in Lisk SDK Version 6.0.0 Dec 5, 2022
@Madhulearn Madhulearn added this to the Sprint 84 milestone Dec 5, 2022
@Madhulearn Madhulearn modified the milestones: Sprint 84, Sprint 85 Dec 19, 2022
shuse2 pushed a commit that referenced this issue Jan 2, 2023
### What was the problem?

This PR resolves #7825

### How was it solved?

* Added test case _should initialize account with default values when
the account is not in Auth Store_
* Renamed test case that was referring to the aforementioned scenario,
but was actually testing a completely different one
* Cleaned up the tests and removed some redundant variables
* Removed unnecessary `as any` type assertions

### How was it tested?

All tests OK 👌🏻
@github-project-automation github-project-automation bot moved this from Backlog to Done in Lisk SDK Version 6.0.0 Jan 2, 2023
@Madhulearn Madhulearn modified the milestones: Sprint 85, Sprint 86 Jan 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants