-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: change all toCalledWith to toHaveBeenCalledWith
- Loading branch information
1 parent
cfbd15e
commit f96987b
Showing
15 changed files
with
1,623 additions
and
1,968 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,7 +79,7 @@ describe("DbAddAccount", () => { | |
password: "valid_password", | ||
}); | ||
|
||
expect(addAccountRepositorySpy).toBeCalledWith({ | ||
expect(addAccountRepositorySpy).toHaveBeenCalledWith({ | ||
name: "valid_name", | ||
email: "[email protected]", | ||
password: "hashed_value", | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ describe("GetAccountByEmail", () => { | |
|
||
await sut.get("[email protected]"); | ||
|
||
expect(getAccountByEmailRepositorySpy).toBeCalledWith( | ||
expect(getAccountByEmailRepositorySpy).toHaveBeenCalledWith( | ||
"[email protected]" | ||
); | ||
}); | ||
|
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,7 +91,7 @@ describe("Sign-Up", () => { | |
const getAccountByEmailSpy = jest.spyOn(getAccountByEmailStub, "get"); | ||
await sut.handle(makeFakeHttpRequest()); | ||
|
||
expect(getAccountByEmailSpy).toBeCalledWith("[email protected]"); | ||
expect(getAccountByEmailSpy).toHaveBeenCalledWith("[email protected]"); | ||
}); | ||
|
||
test("should returns statusCode 409 if account already exists", async () => { | ||
|
@@ -124,7 +124,7 @@ describe("Sign-Up", () => { | |
const addAccountSpy = jest.spyOn(addAccountStub, "add"); | ||
await sut.handle(makeFakeHttpRequest()); | ||
|
||
expect(addAccountSpy).toBeCalledWith({ | ||
expect(addAccountSpy).toHaveBeenCalledWith({ | ||
name: "valid_name", | ||
email: "[email protected]", | ||
password: "valid_password", | ||
|
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
Oops, something went wrong.