Assessment of the GW approximation using Hubbard chains