Skip to content

Commit

Permalink
Add tests for avatar url parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
sagikazarmark committed Jun 14, 2016
1 parent d5321ce commit 7cdfccc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/UrlBuilderBehavior.php
Expand Up @@ -11,6 +11,14 @@ function it_returns_an_avatar_url()
$this->avatar($this->email)->shouldReturn(sprintf('https://secure.gravatar.com/avatar/%s', md5($this->email)));
}

function it_returns_an_avatar_url_with_parameters()
{
$this
->avatar($this->email, ['s' => 500, 'r' => 'g'])
->shouldReturn(sprintf('https://secure.gravatar.com/avatar/%s?s=500&r=g', md5($this->email)))
;
}

function it_allows_to_override_protocol_for_avatar_url()
{
$this->avatar($this->email, [], false)->shouldStartWith('http://www.gravatar.com');
Expand Down

0 comments on commit 7cdfccc

Please sign in to comment.