Skip to content

Instantly share code, notes, and snippets.

@jeffdeville
Created November 13, 2010 15:17
Show Gist options
  • Save jeffdeville/675399 to your computer and use it in GitHub Desktop.
Save jeffdeville/675399 to your computer and use it in GitHub Desktop.
context "user was someones friend before" do
before do
@user = User.new(:facebook_id => 502884401, :is_user => false)
mock_load_existing_user(@user, @access_token)
mock_delay_update_user
Action.stubs(:user_create).with(502884401)
end
it "should audit the user creation" do
Action.expects(:user_create).with(502884401)
get_create
end
it "should upsert the user record" do
mock_upserting_user("expects")
get_create
end
it 'should attempt to load the user if they are existing' do
mock_load_existing_user(@user, @access_token, "expects")
get_create
end
it_should_behave_like "all new session users"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment