Sha256: 81390e7dd292027f09ef54a727b10f1b434d7b48b1c5783c9a54ff8ae6b416ff

Contents?: true

Size: 1.34 KB

Versions: 11

Compression:

Stored size: 1.34 KB

Contents

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

describe Eucalyptus::Account do
  before do
    Eucalyptus.configure do |config|
      config.access_token = ENV["ACCESS_TOKEN"]
    end
  end

  let(:account) { Eucalyptus::Account.all.last }

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

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

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

  describe '#campaigns' do
    it 'returns a collection of Campaign objects which belong to the account' do
      VCR.use_cassette("account_campaigns") do
        expect(account.campaigns).to be_a Array
        expect(account.campaigns.first).to be_a Eucalyptus::Campaign
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
eucalyptus-0.2.13 spec/eucalyptus/account_spec.rb
eucalyptus-0.2.12 spec/eucalyptus/account_spec.rb
eucalyptus-0.2.11 spec/eucalyptus/account_spec.rb
eucalyptus-0.2.10 spec/eucalyptus/account_spec.rb
eucalyptus-0.2.9 spec/eucalyptus/account_spec.rb
eucalyptus-0.2.8 spec/eucalyptus/account_spec.rb
eucalyptus-0.2.7 spec/eucalyptus/account_spec.rb
eucalyptus-0.2.6 spec/eucalyptus/account_spec.rb
eucalyptus-0.2.5 spec/eucalyptus/account_spec.rb
eucalyptus-0.2.4 spec/eucalyptus/account_spec.rb
eucalyptus-0.2.3 spec/eucalyptus/account_spec.rb