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

OptionTypes loaded from DB instead of off product #43

Merged
merged 3 commits into from
Nov 13, 2020

Commits on Nov 13, 2020

  1. Make names downcased in spec

    We force the name to be downcase when we make the option type inside of
    the code, so I think it makes sense to make these match up with what
    we're doing in the code.
    Derrick Plotsky committed Nov 13, 2020
    Configuration menu
    Copy the full SHA
    fccc110 View commit details
    Browse the repository at this point in the history
  2. Add spec for option types in DB, not on product

    This covers the case where the option types already exist inside of the
    DB, but do not exist on the product that is being imported.
    
    In this scenario, we should not be saving new option types, but with
    the current code it does. I'm marking the spec as pending because it
    will fail, but will be passing in the next commit.
    Derrick Plotsky committed Nov 13, 2020
    Configuration menu
    Copy the full SHA
    9d496a5 View commit details
    Browse the repository at this point in the history
  3. Look for OptionType from database

    In the case where the option types already exist in the DB, but not
    in the product, we should look for them there first, so that we can
    use the ones we've already got instead of making more.
    
    This also adds some code so we're not overriding any information already
    present on the option type, specifically the presentation field, as we
    cannot really assume that the presentation should be equal to the name.
    Derrick Plotsky committed Nov 13, 2020
    Configuration menu
    Copy the full SHA
    8494a39 View commit details
    Browse the repository at this point in the history