Fix enum test unused variable warning.

Related - https://github.com/rails/rails/commit/5c55aafd38f45ac019573f98438ffdbdc8c580f9
Merge pull request #14273 from vipulnsward/fix-warning-13244

Fix enum test unused variable warning.