Technically, Decker never left the gate. I don't remember if Spock ever took the cadet crew on a training cruise, but when Kirk came aboard Spock insisted on relinquishing command. "First best destiny" or something.
short-story anthology clearly depicts Spock in command of Enterprise
in 2282, about two years before TWOK. Not cannon, of course, but plausible.
Christopher's novel Ex Machina
similarly establishes that Decker really was captain of the Enterprise
during its refit, as he hand-picked nearly the entire crew. The lot was the most diverse compliment of officers to ever serve on a Federation ship.