fixed test deletion role check logic