Adjusted chi-square test for degree-corrected block models