• Robert Speicher's avatar
    Make the 'issuables list meta-data' shared example less dangerous · 939e9bdd
    Robert Speicher authored
    This shared example would take an object's database ID and create a
    number of objects based on it. If for some reason the ID were a high
    number, like 20, this would create `20 + 21 + 22` objects.
    
    Not only was this dangerous from a performance perspective, it was
    entirely unnecessary, as the behavior it was testing is already
    well-tested in the unit test for the underlying object. For a controller
    test, which is what's including this shared example, all we need to do
    is verify that the assigned object contains the correct `id => object`
    Hash, which is what we now test for.
    939e9bdd
merge_requests_controller_spec.rb 19.7 KB