require "spec_helper" describe Facebooker2::Rails::Helpers::FacebookConnect, :type=>:helper do include Facebooker2::Rails::Helpers describe "fb_login_and_redirect" do it "renders a login button" do fb_login_and_redirect("/").should == "" end it "allows you to specify the text of the button" do fb_login_and_redirect("/",:text=>"my test").should == "my test" end it "allows you to specify the permissions" do fb_login_and_redirect("/",:perms=>"email,offline_access").should == "" end end describe "Logging out" do it "has an fb_logout_link" do fb_logout_link("logout","/").should == "logout" end end describe "server FBML" do it "renders the yielded content inside of an fbml block" do fb_server_fbml do end output_buffer.should == "" end it "includes the content inside the block" do fb_server_fbml do "inner text" end output_buffer.should == "" end it "allows specifying style attributes" do fb_server_fbml "width: 750px;" do end output_buffer.should == "" end end end