Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] Add uniqueness validation for bs request actions
Using the inbuild rspec validation test helper didn't work, because of the association ot BsRequestType named 'type'. ===== 1) BsRequestAction validates uniquness of type among bs requests Failure/Error: type_to_class_name(type_name.to_sym) || super ActiveRecord::SubclassNotFound: The single-table inheritance mechanism failed to locate the subclass: 'an arbitrary value'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite BsRequestAction.inheritance_column to use another column for that information. # ./app/models/bs_request_action.rb:87:in `find_sti_class' # ./spec/models/bs_request_action_spec.rb:7:in `block (2 levels) in <top (required)>' # ./spec/support/logging.rb:4:in `block (2 levels) in <top (required)>' # ------------------ # --- Caused by: --- # NameError: # wrong constant name an arbitrary value # ./app/models/bs_request_action.rb:87:in `find_sti_class'
- Loading branch information