Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

spec for logout button helper

  • Loading branch information...
commit 1c8dccdc6ff44d0294cef08627aff8875d7fdca5 1 parent 0bd67d6
Kristian Mandrup authored
2  lib/facebook-social_plugins/view_helper.rb
View
@@ -46,7 +46,7 @@ def fb_login_button options = {}
def fb_logout_button options = {}
content_tag :a, '', {:id => 'fb_logout_and_reload', :href => '#'}.merge(options[:html] || {}) do
- content_tag :img, :id => 'fb_logout_image', :src => "/assets/fb_logout_#{options[:size] || :small}.gif", :alt => "Facebook Logout"
+ content_tag(:img, '', :id => 'fb_logout_image', :src => "/assets/fb_logout_#{options[:size] || :small}.gif", :alt => "Facebook Logout").html_safe
end
end
7 spec/facebook-social_plugins/view_helper_spec.rb
View
@@ -17,6 +17,13 @@
end
end
+ describe 'Logout button' do
+ it "should create :logout button (anchor with image" do
+ output = fb_logout_button :size => :large
+ output.should == "<a href=\"#\" id=\"fb_logout_and_reload\"><img alt=\"Facebook Logout\" id=\"fb_logout_image\" src=\"/assets/fb_logout_large.gif\"></img></a>"
+ end
+ end
+
describe 'Facebook Root placeholder' do
it "should create :root div" do
output = fb_root
Please sign in to comment.
Something went wrong with that request. Please try again.