Sha256: 3da43461763a4fecc1af7154bcb3a2bba4b67bb5777628bc884212a0613f70ce

Contents?: true

Size: 917 Bytes

Versions: 12

Compression:

Stored size: 917 Bytes

Contents

require 'spec_helper'

describe FbGraph::Review do
  describe '.new' do
    let(:attributes) do
      {
        id: '10150326116771960',
        from: {
          name: 'Erin Bennett',
          id: '3326740'
        },
        to: {
          name: 'Graffiti',
          namespace: 'graffitiwall',
          id: '2439131959'
        },
        message: 'awesome!',
        rating: 5,
        created_time: '2011-10-16T06:50:04+0000'
      }
    end
    subject do
      FbGraph::Review.new attributes[:id], attributes
    end

    its(:from) do
      should == FbGraph::User.new('3326740', name: 'Erin Bennett')
    end
    its(:to) do
      should == FbGraph::Application.new('2439131959', name: 'Graffiti', namespace: 'graffitiwall')
    end
    its(:rating)       { should == 5 }
    its(:message)      { should == 'awesome!' }
    its(:created_time) { should == Time.parse('2011-10-16T06:50:04+0000') }
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
fb_graph-2.7.17 spec/fb_graph/review_spec.rb
fb_graph-2.7.16 spec/fb_graph/review_spec.rb
fb_graph-2.7.15 spec/fb_graph/review_spec.rb
fb_graph-2.7.14 spec/fb_graph/review_spec.rb
fb_graph-2.7.13 spec/fb_graph/review_spec.rb
fb_graph-2.7.12 spec/fb_graph/review_spec.rb
fb_graph-2.7.11 spec/fb_graph/review_spec.rb
fb_graph-2.7.10 spec/fb_graph/review_spec.rb
fb_graph-2.7.9 spec/fb_graph/review_spec.rb
fb_graph-2.7.8 spec/fb_graph/review_spec.rb
fb_graph-2.7.7 spec/fb_graph/review_spec.rb
fb_graph-2.7.6 spec/fb_graph/review_spec.rb