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.7.17 spec/fb_graph/privacy_spec.rb
fb_graph-2.7.16 spec/fb_graph/privacy_spec.rb
fb_graph-2.7.15 spec/fb_graph/privacy_spec.rb
fb_graph-2.7.14 spec/fb_graph/privacy_spec.rb
fb_graph-2.7.13 spec/fb_graph/privacy_spec.rb
fb_graph-2.7.12 spec/fb_graph/privacy_spec.rb
fb_graph-2.7.11 spec/fb_graph/privacy_spec.rb
fb_graph-2.7.10 spec/fb_graph/privacy_spec.rb
fb_graph-2.7.9 spec/fb_graph/privacy_spec.rb
fb_graph-2.7.8 spec/fb_graph/privacy_spec.rb
fb_graph-2.7.7 spec/fb_graph/privacy_spec.rb
fb_graph-2.7.6 spec/fb_graph/privacy_spec.rb
fb_graph-2.7.5 spec/fb_graph/privacy_spec.rb
fb_graph-2.7.4 spec/fb_graph/privacy_spec.rb
fb_graph-2.7.3 spec/fb_graph/privacy_spec.rb
fb_graph-2.7.2 spec/fb_graph/privacy_spec.rb
fb_graph-2.7.1 spec/fb_graph/privacy_spec.rb
fb_graph-2.7.0 spec/fb_graph/privacy_spec.rb
fb_graph-2.6.7 spec/fb_graph/privacy_spec.rb
fb_graph-2.6.6 spec/fb_graph/privacy_spec.rb