Lassaigne's test gives presence of chlorine and nitrogen in organic compound by fusion of organic compound in the presence of sodium. The fused products in this case are:
CH3NH2.HCl→fusionNaNaCNandNaCl
NaCN gives +ve test for nitrogen and NaCl gives +ve test for halogen.