Commit 82585acb authored by Ben Hayward's avatar Ben Hayward

Test & lint

1 merge request!391[Sprint/RollingRabbit](fix): Updated returned exception of offending spam link. #1104
Pipeline #94183753 running with stages
......@@ -57,7 +57,7 @@ class Spam
if (stripos($haystack, $query, $offset) !== false) {
// stop on first true result
return $query;
}
}
}
return false;
}
......
......@@ -286,17 +286,19 @@ class ManagerSpec extends ObjectBehavior
$this->search
);
$spamUrl = 'movieblog.tumblr.com';
$blog->getType()
->willReturn('object');
$blog->getSubtype()
->willReturn('blog');
$blog->getBody()
->shouldBeCalled()
->willReturn('movieblog.tumblr.com');
->willReturn($spamUrl);
$this->shouldThrow(new \Exception('Sorry, you included a reference to a domain name linked to spam. You can not use short urls (eg. bit.ly). Please remove it and try again'))
$this->shouldThrow(new \Exception("Sorry, you included a reference to a domain name linked to spam (${spamUrl})"))
->duringAdd($blog);
}
}
Please register or to comment