Sha256: 333304d798d396e0816c71ae2a5da2262f964d6402ca2b5311dc6ebdd0118724
Contents?: true
Size: 1.24 KB
Versions: 2
Compression:
Stored size: 1.24 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe Eucalyptus::AdSet do before do Eucalyptus.configure do |config| config.access_token = ENV["ACCESS_TOKEN"] end end let(:ad_set) { Eucalyptus::AdSet.all.first } describe '#insights' do it 'returns an array of insights for the account' do VCR.use_cassette("ad_set_insights") do active_ad_set = Eucalyptus::AdSet.all.find{|ad_set| ad_set.campaign_status == "ACTIVE"}.first expect(active_ad_set.insights.first).to be_a Eucalyptus::Insight end end end describe '#campaign' do it 'returns the parent campaign for an ad_set' do VCR.use_cassette("ad_set_campaign") do expect(ad_set.campaign).to be_a Eucalyptus::Campaign end end end describe '#ads' do it 'returns a collection of Ad objects which belong to the ad_set' do VCR.use_cassette("ad_set_ads") do expect(ad_set.ads.first).to be_a Eucalyptus::Ad end end end describe 'returning known fields' do it 'returns an object which responds to available fields' do VCR.use_cassette("ad_set") do expect(ad_set).to respond_to :name expect(ad_set).to respond_to :bid_type end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
eucalyptus-0.3.1 | spec/eucalyptus/ad_set_spec.rb |
eucalyptus-0.3.0 | spec/eucalyptus/ad_set_spec.rb |