teamzone/TeamZone — pull request #20 by Bringer128 (2014-11-13 15:05:46+00:00)
Title: Fixed EmailVerifyServiceFake

@nzdunic The problems were:

1. The call to add an element to the array wasn't correct. The simplest way to do this is the Array.prototype.push() method e.g. https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/push

2. The EmailVerifyService constructor function needed to assign the function to a property on the 'this' object. Using a function as a constructor is a Javascriptism. Effectively, using the 'new' keyword creates a new object then calls the function setting the 'this' pointer in the function to reference the new object. The constructor can then use 'this' to assign properties and functions to the object.

If you have any questions on Javascriptisms give me a shout.