MDL-40697 core: added unit test for grade_deleted event