Cleanup test using Ember.$.trim

`String#replace(/\s+/g, '')` is the same as `Ember.$.trim`.
To simplify test code, I rewrite with the latter.
Merge pull request #3979 from tricknotes/cleanup-tests

Cleanup test using Ember.$.trim