fixed a bug in server which was returning the wrong type on success. Correcting bugs in test to make sure it actually tests