Sha256: 7249dc13650a0dee36d005539e97eafd5c060090ef1c30ffaf2775472c3e48f5

Contents?: true

Size: 754 Bytes

Versions: 1

Compression:

Stored size: 754 Bytes

Contents

require 'spec_helper'

describe PictureFrom::FacebookPicture do

  describe '#picture_from_username' do
    subject { described_class.new }

    it 'returns the image url' do
      link = subject.picture_from_username('karreiro')
      expect(link).to eq('http://graph.facebook.com/karreiro/picture')
    end
  end

  describe '#picture_from_user_info' do
    subject { described_class.new }

    it 'returns the image url' do
      search_url = 'https://www.facebook.com/search.php?q=karreiro@gmail.com'
      search_response = 'facebook_crawler.response'
      fake(search_url, search_response)

      link = subject.picture_from_user_info('karreiro@gmail.com')
      expect(link).to eq('http://graph.facebook.com/karreiro/picture')
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
picture_from-0.0.1 spec/lib/picture_from/facebook_picture_spec.rb