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

refactor: remove item seeding (models med) #4222

Merged

Conversation

elasticspoon
Copy link
Collaborator

@elasticspoon elasticspoon commented Mar 25, 2024

Related to #4199

This is the model changes that require a bit more work.
There are some refactors with changing validations to shoulda matchers, largely just find and replace.

Also contains all itemizables.

Type of change

  • Refactor

How Has This Been Tested?

Passes current suite

@elasticspoon elasticspoon force-pushed the remove-spec-seeding-med-models branch from 16d65cf to 9b29eff Compare March 25, 2024 01:29
@elasticspoon elasticspoon changed the title Remove spec seeding med models refactor: remove item seeding (models med) Mar 25, 2024
@elasticspoon elasticspoon marked this pull request as ready for review March 25, 2024 01:35
@elasticspoon elasticspoon mentioned this pull request Mar 25, 2024
21 tasks
@dorner dorner added the BLOCKED This issue is blocked by another label Mar 26, 2024
@elasticspoon elasticspoon force-pushed the remove-spec-seeding-med-models branch from 9b29eff to 4549e83 Compare March 28, 2024 00:29
@dorner dorner removed the BLOCKED This issue is blocked by another label Mar 28, 2024
@elasticspoon elasticspoon force-pushed the remove-spec-seeding-med-models branch from 8578b1f to 441a770 Compare March 28, 2024 01:32
@elasticspoon elasticspoon marked this pull request as draft April 25, 2024 18:23
@elasticspoon elasticspoon force-pushed the remove-spec-seeding-med-models branch 3 times, most recently from 585fd3f to b238b45 Compare May 2, 2024 02:09
end
# TODO: do negative numbers make sense here?
# it { should validate_numericality_of(:quota).is_greater_than_or_equal_to(0).allow_nil }
it { should validate_numericality_of(:quota).allow_nil }
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

do negative numbers make sense here?

it { should validate_numericality_of(:quota).is_greater_than_or_equal_to(0).allow_nil }

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see no reason you'd have negative quota values. If it doesn't already validate for that, we could make it a GFI.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It does not so probably a GFI

@elasticspoon elasticspoon force-pushed the remove-spec-seeding-med-models branch from b238b45 to 2846a5f Compare May 2, 2024 02:34
@elasticspoon elasticspoon marked this pull request as ready for review May 2, 2024 02:45
@elasticspoon elasticspoon requested a review from dorner May 2, 2024 02:45
Copy link
Collaborator

@dorner dorner left a comment

Choose a reason for hiding this comment

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

Looks amazing! Tiny nits.

spec/models/base_item_spec.rb Show resolved Hide resolved
spec/models/base_item_spec.rb Outdated Show resolved Hide resolved
spec/models/inventory_item_spec.rb Outdated Show resolved Hide resolved
@elasticspoon elasticspoon force-pushed the remove-spec-seeding-med-models branch from 05a7500 to c1b104e Compare May 3, 2024 23:43
@elasticspoon elasticspoon requested a review from dorner May 4, 2024 02:10
Copy link
Collaborator

@dorner dorner 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!

@dorner dorner merged commit 9258f16 into rubyforgood:main May 5, 2024
19 checks passed
@elasticspoon elasticspoon deleted the remove-spec-seeding-med-models branch May 5, 2024 14:21
Copy link
Contributor

github-actions bot commented May 5, 2024

@elasticspoon: Your PR refactor: remove item seeding (models med) is part of today's Human Essentials production release: 2024.05.05.
Thank you very much for your contribution!

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.

None yet

3 participants