Sha256: e793ad849819213afcf41976d536fda7962a8e275947cb143bc4bee02d317b3d
Contents?: true
Size: 1.2 KB
Versions: 34
Compression:
Stored size: 1.2 KB
Contents
require 'spec_helper' describe FbGraph::ReachEstimate, '.new' do let(:attributes) { { :users => 5503300, :bid_estimations => [ { :location => 3, :cpc_min => 27, :cpc_median => 37, :cpc_max => 48, :cpm_min => 8, :cpm_median => 11, :cpm_max => 14 } ], :imp_estimates => [] } } let(:attributes_through_ad_group) { { :data => attributes } } it 'should setup all supported attributes' do estimate = FbGraph::ReachEstimate.new(attributes) estimate.users.should == 5503300 estimate.cpc_min.should == 27 estimate.cpc_median.should == 37 estimate.cpc_max.should == 48 estimate.cpm_min.should == 8 estimate.cpm_median.should == 11 estimate.cpm_max.should == 14 end it 'should setup all supported attributes through AdGroup' do estimate = FbGraph::ReachEstimate.new(attributes_through_ad_group) estimate.users.should == 5503300 estimate.cpc_min.should == 27 estimate.cpc_median.should == 37 estimate.cpc_max.should == 48 estimate.cpm_min.should == 8 estimate.cpm_median.should == 11 estimate.cpm_max.should == 14 end end
Version data entries
34 entries across 34 versions & 1 rubygems