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

fix: allowances enable unit test fixture data #1888

Merged
merged 1 commit into from
Dec 21, 2022

Conversation

qqqzhch
Copy link
Contributor

@qqqzhch qqqzhch commented Dec 19, 2022

Describe the changes you have made in this PR

Edit the allowance enable test fixture data

When checking the data, the data with id 2 is used, so there can only be one item fixture data

const allowance = await db.allowances.get(2);

Type of change

(Remove other not matching type)

  • fix: Bug fix (non-breaking change which fixes an issue)

Screenshots of the changes [optional]

Add screenshots to make your changes easier to understand. You can also add a video here.

How has this been tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Checklist

  • My code follows the style guidelines of this project and performed a self-review of my own code
  • New and existing tests pass locally with my changes
  • I checked if I need to make corresponding changes to the documentation (and made those changes if needed)

@qqqzhch qqqzhch marked this pull request as ready for review December 19, 2022 02:43
@qqqzhch qqqzhch changed the title fix: allowances enable unit test fix: allowances enable unit test fixture data Dec 19, 2022
@github-actions
Copy link

🚀 Thanks for the pull request!

Here are the current build files for testing:

Download and unzip the file for your browser. Refer to the readme for detailed install instructions.


This build is brought to you by: Adam Fiscor (who recently dropped 1337 sats):

The future is bright. We just have a lot of work to do.

Want to sponsor the next build? send some sats to ⚡️builds@getalby.com (don't forget to provide your name)

Don't forget: keep earning sats!

@escapedcat
Copy link
Contributor

Ah, thanks! So the test would always have been green because there were already 2 items, right?

@bumi bumi requested a review from lisabaut December 20, 2022 22:46
@qqqzhch
Copy link
Contributor Author

qqqzhch commented Dec 21, 2022

Ah, thanks! So the test would always have been green because there were already 2 items, right?

yes, the second item of the old test data can be verified by the test, so the test is always green

In the previous test data, the enbale attribute of the second item is true, which can be verified.

When inserting a new data during test execution, the new item is the third, but the second item is still obtained for verification, test is always green,so the test is skipped

According to the test, the newly inserted item is the second item, so only one item is prepared for the test data

@escapedcat escapedcat merged commit 32cf16d into getAlby:master Dec 21, 2022
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