Sha256: aef9afbf0ec4b81cee84ac4ab45af940065b4e65ea64c187126e27223461f826

Contents?: true

Size: 1.41 KB

Versions: 36

Compression:

Stored size: 1.41 KB

Contents

require 'spec_helper'

describe FbGraph::Connections::AdGroups, '#ad_creatives' do
  context 'when included by FbGraph::AdGroup' do
    context 'when access_token is given' do
      it 'should return ad_creatives as FbGraph::AdCreative' do
        mock_graph :get, '22334455/adcreatives', 'ad_groups/ad_creatives/22334455_ad_creatives', :access_token => 'access_token' do
          ad_creatives = FbGraph::AdGroup.new('22334455', :access_token => 'access_token').ad_creatives
          ad_creatives.size.should == 1 
          ad_creative = ad_creatives.first 
          ad_creative.identifier.should == "6003590469668"
          ad_creative.view_tag.should == ""
          ad_creative.alt_view_tags.should == []
          ad_creative.creative_id.should == "6003590469668"
          ad_creative.type.should == 1
          ad_creative.title.should == "Some Creative"
          ad_creative.body.should == "The Body"
          ad_creative.image_hash.should == "4c34b48cdcbf5dd3055acb717343a9d6"
          ad_creative.link_url.should == "http://www.google.com/"
          ad_creative.name.should == "Creative Name"
          ad_creative.run_status.should == 1
          ad_creative.preview_url.should == "http://www.facebook.com/ads/api/creative_preview.php?cid=6003590469668"
          ad_creative.count_current_adgroups.should == 1
          ad_creative.image_url.should == "https://www.google.com/image.png"
        end
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
fb_graph-2.7.17 spec/fb_graph/connections/ad_creatives_spec.rb
fb_graph-2.7.16 spec/fb_graph/connections/ad_creatives_spec.rb
fb_graph-2.7.15 spec/fb_graph/connections/ad_creatives_spec.rb
fb_graph-2.7.14 spec/fb_graph/connections/ad_creatives_spec.rb
fb_graph-2.7.13 spec/fb_graph/connections/ad_creatives_spec.rb
fb_graph-2.7.12 spec/fb_graph/connections/ad_creatives_spec.rb
fb_graph-2.7.11 spec/fb_graph/connections/ad_creatives_spec.rb
fb_graph-2.7.10 spec/fb_graph/connections/ad_creatives_spec.rb
fb_graph-2.7.9 spec/fb_graph/connections/ad_creatives_spec.rb
fb_graph-2.7.8 spec/fb_graph/connections/ad_creatives_spec.rb
fb_graph-2.7.7 spec/fb_graph/connections/ad_creatives_spec.rb
fb_graph-2.7.6 spec/fb_graph/connections/ad_creatives_spec.rb
fb_graph-2.7.5 spec/fb_graph/connections/ad_creatives_spec.rb
fb_graph-2.7.4 spec/fb_graph/connections/ad_creatives_spec.rb
fb_graph-2.7.3 spec/fb_graph/connections/ad_creatives_spec.rb
fb_graph-2.7.2 spec/fb_graph/connections/ad_creatives_spec.rb
fb_graph-2.7.1 spec/fb_graph/connections/ad_creatives_spec.rb
fb_graph-2.7.0 spec/fb_graph/connections/ad_creatives_spec.rb
fb_graph-2.6.7 spec/fb_graph/connections/ad_creatives_spec.rb
fb_graph-2.6.6 spec/fb_graph/connections/ad_creatives_spec.rb