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

complete specs for stock movement model #137

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

sawangupta92
Copy link

  1. Use constant QUANTITY_LIMITS for maximum and minimum quantity.
  2. Use persisted? instead of !new_record? in #readonly?.
  3. Write rspecs for Constants, Associations, Validations, Callbacks, Ransackable attributes, Scope, #readonly?
  4. Move #update_stock_item_quantity to describe block of Instance Methods

1) use is_expected syntax for should a matcher
2) change quantity contstants to a single hash
QUANTITY = {
max: 2147483647,
min: -2147483648
}
Copy link

Choose a reason for hiding this comment

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

Please use 2*31 instead of exact number. Rename it to QUANTITY_LIMITS

@jitendra jitendra assigned sawangupta92 and unassigned jitendra Mar 3, 2016
@sawangupta92 sawangupta92 assigned jitendra and unassigned sawangupta92 Mar 3, 2016
@jitendra
Copy link

jitendra commented Mar 9, 2016

@sawangupta92 please add proper description to this PR.

@jitendra jitendra assigned sawangupta92 and unassigned jitendra Mar 9, 2016
@jitendra
Copy link

@sawangupta92 It looks good to me. Please raise on Spree with same description in PR

@jitendra jitendra assigned sawangupta92 and unassigned jitendra Mar 17, 2016
@sawangupta92 sawangupta92 force-pushed the spec-for-stock-movement branch from b0f7b9d to 45652ba Compare March 21, 2016 07:07
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