Sha256: 0e14ced234ef230bcd1d01ef9b483bc300a7d0a422e1b278a9c00638aadad812

Contents?: true

Size: 1.03 KB

Versions: 7

Compression:

Stored size: 1.03 KB

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe Eucalyptus::Campaign do

  let(:campaign) { Eucalyptus::Campaign.all.last }

  describe '#insights' do
    it 'returns an array of insights for the account' do
      VCR.use_cassette("campaign_insights") do
        expect(campaign.insights.first).to be_a Eucalyptus::Insight
      end
    end
  end

  describe '#ads' do
    it 'returns a collection of Ad objects which belong to the campaign' do
      VCR.use_cassette("campaign_ads") do
        expect(campaign.ads.first).to be_a Eucalyptus::Ad
      end
    end
  end

  describe '#ad_sets' do
    it 'returns a collection of Ad objects which belong to the campaign' do
      VCR.use_cassette("campaign_ad_sets") do
        expect(campaign.ad_sets.first).to be_a Eucalyptus::AdSet
      end
    end
  end

  describe 'returning known fields' do
    it 'returns an object which responds to available fields' do
      VCR.use_cassette("campaign") do
        expect(campaign).to respond_to :name
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
eucalyptus-1.2.4 spec/eucalyptus/campaign_spec.rb
eucalyptus-1.2.3 spec/eucalyptus/campaign_spec.rb
eucalyptus-1.2.2 spec/eucalyptus/campaign_spec.rb
eucalyptus-1.2.1 spec/eucalyptus/campaign_spec.rb
eucalyptus-1.2.0 spec/eucalyptus/campaign_spec.rb
eucalyptus-1.1.0 spec/eucalyptus/campaign_spec.rb
eucalyptus-1.0.0 spec/eucalyptus/campaign_spec.rb