Sha256: 56e21f42df37eea674e3e68f5c44549965103122296b990b368101938d950bb4

Contents?: true

Size: 577 Bytes

Versions: 44

Compression:

Stored size: 577 Bytes

Contents

require File.join(File.dirname(__FILE__), '../spec_helper')

describe FbGraph::Insight, '.new' do

  it 'should setup all supported attributes' do
    attributes = {
      :name => 'name_for_the_stats',
      :period => 'day',
      :values => [{'key1' => 'value2'}, {'key2' => 'value2'}]
    }
    insight = FbGraph::Insight.new('foo/insights/bar', attributes)
    insight.identifier == 'foo/insights/bar'
    insight.period.should == 'day'
    insight.values.should == [{'key1' => 'value2'}, {'key2' => 'value2'}]
    insight.values.first[:key1].should == 'value2'
  end

end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
fb_graph-1.7.0 spec/fb_graph/insight_spec.rb
fb_graph-1.7.0.alpha2 spec/fb_graph/insight_spec.rb
fb_graph-1.6.9 spec/fb_graph/insight_spec.rb
fb_graph-1.7.0.alpha spec/fb_graph/insight_spec.rb
fb_graph-1.6.8 spec/fb_graph/insight_spec.rb
fb_graph-1.6.7 spec/fb_graph/insight_spec.rb
fb_graph-1.6.5 spec/fb_graph/insight_spec.rb
fb_graph-1.6.4 spec/fb_graph/insight_spec.rb
fb_graph-1.6.3 spec/fb_graph/insight_spec.rb
fb_graph-1.6.2 spec/fb_graph/insight_spec.rb
fb_graph-1.6.1 spec/fb_graph/insight_spec.rb
fb_graph-1.6.0 spec/fb_graph/insight_spec.rb
fb_graph-1.5.5 spec/fb_graph/insight_spec.rb
fb_graph-1.5.4 spec/fb_graph/insight_spec.rb
fb_graph-1.5.3 spec/fb_graph/insight_spec.rb
fb_graph-1.5.2 spec/fb_graph/insight_spec.rb
fb_graph-1.5.1 spec/fb_graph/insight_spec.rb
fb_graph-1.5.0 spec/fb_graph/insight_spec.rb
fb_graph-1.4.1 spec/fb_graph/insight_spec.rb
fb_graph-1.4.0 spec/fb_graph/insight_spec.rb