Skip to content

Instantly share code, notes, and snippets.

@scottillogical
Created March 30, 2010 19:31
Show Gist options
  • Save scottillogical/349490 to your computer and use it in GitHub Desktop.
Save scottillogical/349490 to your computer and use it in GitHub Desktop.
#
# Granddaddy test. Save all the different types of entry then run the service call to see if it returns the correct data
#
it "should return correct redirect_urls with everything in the database" do
debugger
h = {:tid => "990"}
# just tid
google = "http://www.google.com"
UnapprovedCreativeFactory.new(h.merge({:redirect_url => google})).arrive.should be_eql google
# tid and arrival_token
bing = "http://www.bing.com"
UnapprovedCreativeFactory.new(:save_arrival_token, h.merge({:redirect_url => bing})).arrive.should be_eql bing
h[:pub_id] = "100097"
# tid and pub_id
yahoo = "http://www.yahoo.com"
UnapprovedCreativeFactory.new(h.merge(:redirect_url => yahoo)).arrive.should be_eql yahoo
# tid and pub_id and arrival_token
altavista = "http://www.altavista.com"
UnapprovedCreativeFactory.new(:save_arrival_token, h.merge(:redirect_url => altavista)).arrive.should be_eql altavista
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment