Module: Facebooker::Rails::TestHelpers

Included in:
IntegrationSession
Defined in:
lib/facebooker/rails/test_helpers.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) assert_facebook_redirect_to(url)



4
5
6
7
8
# File 'lib/facebooker/rails/test_helpers.rb', line 4

def assert_facebook_redirect_to(url)
  assert_response :success
  assert_not_nil facebook_redirect_url
  assert_equal url, facebook_redirect_url
end

- (Object) facebook_delete(path, params = {}, session = nil, flash = nil)



26
27
28
# File 'lib/facebooker/rails/test_helpers.rb', line 26

def facebook_delete(path,params={}, session=nil, flash=nil)
  facebook_verb(:delete, path, params, session, flash)
end

- (Object) facebook_get(path, params = {}, session = nil, flash = nil)



14
15
16
# File 'lib/facebooker/rails/test_helpers.rb', line 14

def facebook_get(path, params={}, session=nil, flash=nil)
  facebook_verb(:get, path, params, session, flash)
end

- (Object) facebook_params(params = {})



34
35
36
37
38
# File 'lib/facebooker/rails/test_helpers.rb', line 34

def facebook_params(params = {})
  params = default_facebook_parameters.with_indifferent_access.merge(params || {})
  sig = generate_signature params
  params.merge(:fb_sig => sig)
end

- (Object) facebook_post(path, params = {}, session = nil, flash = nil)



18
19
20
# File 'lib/facebooker/rails/test_helpers.rb', line 18

def facebook_post(path,params={}, session=nil, flash=nil)
  facebook_verb(:post, path, params, session, flash)
end

- (Object) facebook_put(path, params = {}, session = nil, flash = nil)



22
23
24
# File 'lib/facebooker/rails/test_helpers.rb', line 22

def facebook_put(path,params={}, session=nil, flash=nil)
  facebook_verb(:put, path, params, session, flash)
end

- (Object) facebook_verb(verb, path, params = {}, session = nil, flash = nil)



30
31
32
# File 'lib/facebooker/rails/test_helpers.rb', line 30

def facebook_verb(verb, path, params={}, session=nil, flash=nil)
  send verb, path, facebook_params(params).reverse_merge(:canvas => true), session, flash
end

- (Object) follow_facebook_redirect!



10
11
12
# File 'lib/facebooker/rails/test_helpers.rb', line 10

def follow_facebook_redirect!
  facebook_post facebook_redirect_url
end