Update registerSpec.js

Fix unit test.