Nitrogen gas is so inert, basically, the only test is to carry out every test known for other gases and if you get a null result for them all, chances are that the gas is nitrogen.
It is a test by default.
shammy is correct in that there is no single test for nitrogen. However, if you are talking about gases present in Earth's atmoshphere then you can rule out oxygen (glowing splint relights) and carbon dioxide (lime water turns milky) but then if burning magnesium continues to "burn" in the gas it must be nitrogen rather than one of the Noble gases.
Following on from what Gef has said if nitrogen is passed over red hot magnesium it will form magnesium nitride. If that is added to water it reacts (vigorously IIRC) to produce ammonia which will be recogisable by its smell or can be confirmed by the usual tests for ammonia.
I work in a lab where we analyze gas samples for inert gases. I am mostly interested in noble gases, but we can analyze a gas sample for nitrogen using gas chromatography. I'm not sure what type of column or detector we use ( I think it is a thermal conductivity detector). I can find out though if you are interested.