Add tests for shorten_if_new
Add tests for shorten_if_new

This commit adds tests checking expected number of various calls in case
an IntegrityError is being raised repeatedly.

piotr-rusin/url-shortener,piotr-rusin/url-shortener