Sha256: f72697828bd755c4e25210722df825e9ecb42d9b56fdf4141d2794b52eb35240

Contents?: true

Size: 950 Bytes

Versions: 44

Compression:

Stored size: 950 Bytes

Contents

describe FbGraph::AdKeyword, '.search' do
  it 'should perform a search' do
    mock_graph :get, 'search', 'ad_keywords/buffy_search', :params => {:q => 'buffy', :type => 'adkeyword'} do
      ad_keywords = FbGraph::AdKeyword.search('buffy')

      ad_keywords.size.should == 8
      ad_keywords.each {|kw| kw.should be_instance_of(FbGraph::AdKeyword)}
      ad_keywords.first.should == FbGraph::AdKeyword.new(
        6003357305127,
        :name => "#Buffy the Vampire Slayer (TV series)",
        :description => "Audience: 1,300,000"
      )
    end
  end
end

describe FbGraph::AdKeyword, '.topic_keyword?' do
  it 'should be true for topic keywords' do
    FbGraph::AdKeyword.new(12345, {:name => "#Topics Have Hashes", :description => "Audience: 1,000"}).topic_keyword?.should be_true
  end

  it "should be false for non-topic keywords" do
    FbGraph::AdKeyword.new(12345, {:name => "No Hash Here"}).topic_keyword?.should be_false
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
fb_graph-2.5.3 spec/fb_graph/ad_keyword_spec.rb
fb_graph-2.5.2 spec/fb_graph/ad_keyword_spec.rb
fb_graph-2.5.1 spec/fb_graph/ad_keyword_spec.rb
fb_graph-2.5.0 spec/fb_graph/ad_keyword_spec.rb
fb_graph-2.4.20 spec/fb_graph/ad_keyword_spec.rb
fb_graph-2.4.19 spec/fb_graph/ad_keyword_spec.rb
fb_graph-2.4.18 spec/fb_graph/ad_keyword_spec.rb
fb_graph-2.4.17 spec/fb_graph/ad_keyword_spec.rb
fb_graph-2.4.16 spec/fb_graph/ad_keyword_spec.rb
fb_graph-2.4.15 spec/fb_graph/ad_keyword_spec.rb
fb_graph-2.4.14 spec/fb_graph/ad_keyword_spec.rb
fb_graph-2.4.13 spec/fb_graph/ad_keyword_spec.rb
fb_graph-2.4.12 spec/fb_graph/ad_keyword_spec.rb
fb_graph-2.4.11 spec/fb_graph/ad_keyword_spec.rb
fb_graph-2.4.10 spec/fb_graph/ad_keyword_spec.rb
fb_graph-2.4.9 spec/fb_graph/ad_keyword_spec.rb
fb_graph-2.4.8 spec/fb_graph/ad_keyword_spec.rb
fb_graph-2.4.7 spec/fb_graph/ad_keyword_spec.rb
fb_graph-2.4.6 spec/fb_graph/ad_keyword_spec.rb
fb_graph-2.4.4 spec/fb_graph/ad_keyword_spec.rb