Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wallet update integration tests #257

Merged
merged 1 commit into from
May 14, 2019

Conversation

piotr-iohk
Copy link
Contributor

Issue Number

Overview

  • I have added tests for wallet update name

Comments

Still working on wallet update pass integration tests. Can get them in this PR (or another one if this one gets reviewed/approved before I finish)

@piotr-iohk piotr-iohk self-assigned this May 13, 2019
@piotr-iohk piotr-iohk changed the title Wallet update name integration tests Wallet update integration tests May 13, 2019
Copy link
Contributor

@rvl rvl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

[ expectResponseCode @IO HTTP.status200
, expectListSizeEqual 1
, expectListItemFieldEqual 0 walletName "New great name"
, expectListItemFieldEqual 0 addressPoolGap 20
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The verifications could be shortened to just check walletName and walletId without reducing the effectiveness of this test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, most probably. Although in general I prefer to verify as much as possible whenever I can (just to be safe).

@@ -875,6 +1065,11 @@ spec = do
"passphrase": "Secure passphrase"
} |]

updateNamePayload :: Text -> Payload
updateNamePayload name = Json [json| {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also a possibility:

Json (Object ("name" .= name))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the hint :)

@piotr-iohk piotr-iohk force-pushed the piotr/integration_tests_update_wallet branch from c89b3ed to 1574f77 Compare May 14, 2019 07:06
@piotr-iohk piotr-iohk merged commit f67fb52 into master May 14, 2019
@piotr-iohk piotr-iohk deleted the piotr/integration_tests_update_wallet branch May 14, 2019 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants