Gravatar support for issue detai, user grid, and activity stream
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@1962 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
1399f3dd12
commit
ed314caf7d
12 files changed
+283
-24
No files matched your search
+37
@@ -0,0 +1,37 @@
|
||||
require 'rubygems'
|
||||
require 'erb' # to get "h"
|
||||
require 'active_support' # to get "returning"
|
||||
require File.dirname(__FILE__) + '/../lib/gravatar'
|
||||
include GravatarHelper, GravatarHelper::PublicMethods, ERB::Util
|
||||
|
||||
context "gravatar_url with a custom default URL" do
|
||||
setup do
|
||||
@original_options = DEFAULT_OPTIONS.dup
|
||||
DEFAULT_OPTIONS[:default] = "no_avatar.png"
|
||||
@url = gravatar_url("somewhere")
|
||||
end
|
||||
|
||||
specify "should include the \"default\" argument in the result" do
|
||||
@url.should match(/&default=no_avatar.png/)
|
||||
end
|
||||
|
||||
teardown do
|
||||
DEFAULT_OPTIONS.merge!(@original_options)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context "gravatar_url with default settings" do
|
||||
setup do
|
||||
@url = gravatar_url("somewhere")
|
||||
end
|
||||
|
||||
specify "should have a nil default URL" do
|
||||
DEFAULT_OPTIONS[:default].should be_nil
|
||||
end
|
||||
|
||||
specify "should not include the \"default\" argument in the result" do
|
||||
@url.should_not match(/&default=/)
|
||||
end
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user