Text this: Testing the Tremaine–Weinberg method applied to integral-field spectroscopic data using a simulated barred galaxy