require 'spec_helper'

describe FacebookSignup do

  it "does not delete new one" do
    new_signup = FactoryGirl.create(:facebook_signup)

    FacebookSignup.delete_old

    FacebookSignup.find(new_signup.id)
  end

  it "does delete old one" do
    old_signup = FactoryGirl.create(:facebook_signup, :created_at => 10.days.ago)

    FacebookSignup.delete_old

    FacebookSignup.find_by_id(old_signup.id).should be_nil
  end
end
