Created
September 14, 2012 23:37
-
-
Save tonatiuh/3725616 to your computer and use it in GitHub Desktop.
Failing test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def new_contact_obligations | |
# self.vertical = conversions.first.placement.vertical | |
self.attributes = load_loc_attrs | |
self.save! | |
notify_observers(:find_campaigns) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
before :each do | |
@vertical = FactoryGirl.create(:vertical) | |
@geo = FactoryGirl.create(:geo) | |
end | |
context "when find_campaigns callback is called" do | |
it 'should automatically purchase a contact when a matching campaign', run: true do | |
campaign = FactoryGirl.create(:campaign, :geos => [@geo], :vertical => @vertical) | |
contact = FactoryGirl.create(:contact , :geo => @geo, :vertical => @vertical) | |
contact.new_contact_obligations | |
contact.campaigns.first.should eql campaign | |
campaign.purchases.first.contact.should eql contact | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ok man, I'll check that then because looks like that line is the only issue that i have to finish this feature, thanks ( :