Skip to content

Instantly share code, notes, and snippets.

@timuruski
Created August 16, 2011 21:08
Show Gist options
  • Select an option

  • Save timuruski/1150185 to your computer and use it in GitHub Desktop.

Select an option

Save timuruski/1150185 to your computer and use it in GitHub Desktop.
describe "#GET /3.x/auth/:to/callback" do
it "creates a callback-request" do
any_instance_of(API::Authentication::Service::CallbackRequest) do |callback|
# Smell a refactor? I do.
mock(callback).code=('foo')
mock(callback).state=('bar')
mock(callback).error_description=('')
mock(callback).to=('facebook')
end
get "/3.0/auth/facebook/callback", { :code => 'foo', :state => 'bar', :error_description => '', :to => 'facebook'}
end
# ...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment