hudmol/archivesspace — pull request #502 by lcdhoffman (2013-06-17 01:23:09+00:00)
Title: Clash of enums

In MySQL, enums differing only in case are causing an error where the valid? method makes it seem like the case-differing enum is valid, but an error is raised when the property is actually set (since the valid? method assumes that a contraint error means the value is already in the DB).

To reproduce:

1: checkout https://github.com/hudmol/archivesspace/commit/ef2af0d39a657aa12fa05c2b9fd541e9bae8c6bc

2. export ASPACE_TEST_DB_URL="jdbc:mysql://..."

3. cd backend/spec

4 rspec model_enumeration_spec.rb

Proposed solution is in the last commit of this PR.