From 4a11c22a7450ae668c60af5ada1bce018fea594b Mon Sep 17 00:00:00 2001 From: Konstantin Haase Date: Thu, 15 Oct 2015 10:40:30 +0200 Subject: [PATCH] add another avatar spec --- spec/v3/renderer/avatar_url_spec.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spec/v3/renderer/avatar_url_spec.rb b/spec/v3/renderer/avatar_url_spec.rb index a154325c..e8c84b69 100644 --- a/spec/v3/renderer/avatar_url_spec.rb +++ b/spec/v3/renderer/avatar_url_spec.rb @@ -38,8 +38,13 @@ describe Travis::API::V3::Renderer::AvatarURL do it { should be == "https://0.gravatar.com/avatar/acbd18db4cc2f85cedef654fccc4a4d8" } end + describe 'with email and empty gravatar_id' do + let(:object) { stub('input', gravatar_id: "", email: "foo") } + it { should be == "https://0.gravatar.com/avatar/acbd18db4cc2f85cedef654fccc4a4d8" } + end + describe 'with missing email' do let(:object) { stub('input', email: nil) } it { should be_nil } end -end \ No newline at end of file +end