Sha256: 3396bbd896163de5463577dcac95a624679b5a731bc14f68f1d9f52b9911b1e2

Contents?: true

Size: 927 Bytes

Versions: 109

Compression:

Stored size: 927 Bytes

Contents

require 'spec_helper'

describe FbGraph::Privacy, '.new' do
  it 'should setup all supported attributes' do
    attributes = {
      :value => 'CUSTOM',
      :friends => 'SOME_FRIENDS',
      :networks => '123,456,789',
      :allow => '999,888,777',
      :deny => '000,111,222'
    }
    privacy = FbGraph::Privacy.new(attributes)
    privacy.value.should    == 'CUSTOM'
    privacy.friends.should  == 'SOME_FRIENDS'
    privacy.networks.should == '123,456,789'
    privacy.allow.should    == '999,888,777'
    privacy.deny.should     == '000,111,222'
  end
end

describe FbGraph::Privacy, '.to_json' do
  it 'should return JSON object' do
    attributes = {
      :value => 'CUSTOM',
      :friends => 'SOME_FRIENDS',
      :networks => '123,456,789',
      :allow => '999,888,777',
      :deny => '000,111,222'
    }
    privacy = FbGraph::Privacy.new(attributes)
    privacy.to_json.should == attributes.to_json
  end
end

Version data entries

109 entries across 109 versions & 1 rubygems

Version Path
fb_graph-2.1.2 spec/fb_graph/privacy_spec.rb
fb_graph-2.1.1 spec/fb_graph/privacy_spec.rb
fb_graph-2.1.0 spec/fb_graph/privacy_spec.rb
fb_graph-2.1.0.alpha spec/fb_graph/privacy_spec.rb
fb_graph-2.0.2 spec/fb_graph/privacy_spec.rb
fb_graph-2.0.1 spec/fb_graph/privacy_spec.rb
fb_graph-2.0.0 spec/fb_graph/privacy_spec.rb
fb_graph-2.0.0.beta spec/fb_graph/privacy_spec.rb
fb_graph-2.0.0.alpha spec/fb_graph/privacy_spec.rb
fb_graph-1.9.5 spec/fb_graph/privacy_spec.rb
fb_graph-1.9.4 spec/fb_graph/privacy_spec.rb
fb_graph-1.9.3 spec/fb_graph/privacy_spec.rb
fb_graph-1.9.2 spec/fb_graph/privacy_spec.rb
fb_graph-1.9.1 spec/fb_graph/privacy_spec.rb
fb_graph-1.9.0 spec/fb_graph/privacy_spec.rb
fb_graph-1.8.6 spec/fb_graph/privacy_spec.rb
fb_graph-1.8.5 spec/fb_graph/privacy_spec.rb
fb_graph-1.8.4 spec/fb_graph/privacy_spec.rb
fb_graph-1.8.3 spec/fb_graph/privacy_spec.rb
fb_graph-1.8.2 spec/fb_graph/privacy_spec.rb