Sha256: 4c8b84658f331b48235e2cdec9d939733cc67b7f5f8814a9738e9652e4de5705

Contents?: true

Size: 825 Bytes

Versions: 59

Compression:

Stored size: 825 Bytes

Contents

require 'spec_helper'

describe FbGraph::Connections::Tags do
  let :photo do
    mock_graph :get, 'with_tags', 'photos/with_tags' do
      FbGraph::Photo.fetch('with_tags')
    end
  end

  describe '#tags' do
    context 'when cached' do
      it 'should not make request' do
        expect { photo.tags }.should_not request_to "#{photo.identifier}/tags"
      end
      it 'should make request when any options are specified' do
        expect { photo.tags(:no_cache => true) }.should request_to "#{photo.identifier}/tags"
      end
    end
  end

  describe FbGraph::Connections::Tags::Taggable do
    describe '#tag!' do
      it 'should post a tag' do
        expect do
          photo.tag!(:to => 'matake', :x => 50, :y => 50)
        end.should request_to "#{photo.identifier}/tags", :post
      end
    end
  end
end

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
fb_graph-2.4.17 spec/fb_graph/connections/tags_spec.rb
fb_graph-2.4.16 spec/fb_graph/connections/tags_spec.rb
fb_graph-2.4.15 spec/fb_graph/connections/tags_spec.rb
fb_graph-2.4.14 spec/fb_graph/connections/tags_spec.rb
fb_graph-2.4.13 spec/fb_graph/connections/tags_spec.rb
fb_graph-2.4.12 spec/fb_graph/connections/tags_spec.rb
fb_graph-2.4.11 spec/fb_graph/connections/tags_spec.rb
fb_graph-2.4.10 spec/fb_graph/connections/tags_spec.rb
fb_graph-2.4.9 spec/fb_graph/connections/tags_spec.rb
fb_graph-2.4.8 spec/fb_graph/connections/tags_spec.rb
fb_graph-2.4.7 spec/fb_graph/connections/tags_spec.rb
fb_graph-2.4.6 spec/fb_graph/connections/tags_spec.rb
fb_graph-2.4.4 spec/fb_graph/connections/tags_spec.rb
fb_graph-2.4.3 spec/fb_graph/connections/tags_spec.rb
fb_graph-2.4.2 spec/fb_graph/connections/tags_spec.rb
fb_graph-2.4.1 spec/fb_graph/connections/tags_spec.rb
fb_graph-2.4.0 spec/fb_graph/connections/tags_spec.rb
fb_graph-2.3.2 spec/fb_graph/connections/tags_spec.rb
fb_graph-2.3.1 spec/fb_graph/connections/tags_spec.rb
fb_graph-2.3.0 spec/fb_graph/connections/tags_spec.rb