fixes wrong placement of expect in header integration test

QUnit's expect() doesn't make sense inside the async method - it will be called only if visit() method results in success and it should verify exactly the opposite situation. I've moved it to its correct place at the top of the test.