Code for installing junction boxes in ceiling
I'm finishing a part of my basement, and I'm redoing the recessed lights in my basement. I'm trying to figure out what to do for one part where the homeowner spliced into the existing electrical run. The circuit is just for lighting on the lower floor, but it goes from one end of the house to the other.
The issue is that the owner cut the line that feeds the basement (at the point of one of the recessed cans) at one point, and tapped into it and ran it to switches below, but now I want to remove the "tapped" line at that point.
I understand it's frowned upon to put concealed junction boxes behind drywall, but is it against code? If I'm going to put a recessed light in the near vicinity, could I just wire nut the connections and stick them in the electrical box of the recessed can? Or, would you guys recommend installing a separate ceiling/junction box, with a "cap" that's accessible?
I'm not sure exactly what's the "right" way, and could use some advice. The wire is just 14/2 romex.