Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

oauth property for javascript now controlled by yml

  • Loading branch information...
commit 7c7f3569a38d9ea3f65ef2181cec6c5f45a060be 1 parent 2532534
andy authored
View
3  .gitignore
@@ -1,4 +1,5 @@
*.swp
.bundle
.rvmrc
-Gemfile.lock
+Gemfile.lock
+.idea
View
2  lib/facebooker2/rails/helpers/javascript.rb
@@ -16,7 +16,7 @@ def fb_connect_async_js(app_id=Facebooker2.app_id,options={},&proc)
cookie = opts[:cookie].nil? ? true : opts[:cookie]
status = opts[:status].nil? ? true : opts[:status]
xfbml = opts[:xfbml].nil? ? true : opts[:xfbml]
- oauth2 = opts[:oauth2].nil? ? false : true
+ oauth2 = Facebooker2.oauth2 ? true : false
channel_url = opts[:channel_url]
lang = opts[:locale] || 'en_US'
extra_js = capture(&proc) if block_given?
View
4 spec/helpers/javascript_spec.rb
@@ -1,6 +1,7 @@
require "spec_helper"
describe Facebooker2::Rails::Helpers::Javascript, :type=>:helper do
include Facebooker2::Rails::Helpers
+ include Facebooker2
describe "fb_connect_async_js" do
it "loads with defaults" do
pending
@@ -54,7 +55,8 @@
end
it "supports oauth" do
- js = fb_connect_async_js '12345', :oauth2=> true
+ Facebooker2.oauth2=true
+ js = fb_connect_async_js '12345'
js.include?("oauth").should be_true, js
end
Please sign in to comment.
Something went wrong with that request. Please try again.