• pbair's avatar
    Raise error if iid is not set as expected · db275d0c
    pbair authored
    With the change to using before_save hook to set the iid on an object,
    normal validations can't be used to verify the presence of the iid.
    
    In normal situations, the iid should always be set by either
    ensure_scope_iid hook or application logic, but since we're lacking
    database constraints on some tables we don't want to silently insert bad
    data. To prevent unforeseen issues cause by bugs, add an additional
    before_save hook to raise an exception if the iid is not set as it
    should be.
    db275d0c
issuable_spec.rb 3.49 KB