Adding test for index.registerType with credentials defined

@knolleary - can you just double check that this test does in fact test what I think it should please? I wanted to test that credentials were initialised and associated with the node when registerType was called with credentials defined.