Share on Facebook Service + Share on Twitter Directive

aJust found out. In line 27 you overwrite the local share service variable, and when you spy on it, you're spying in a different object from the directive itself. Removing lines from 27-29 would do the trick.

Anyway, instead of `element.find('button')[0].click();` I would go `element.find('button').triggerHandler('click');`.