Sha256: 5fc41c6dc449c5ed9c508289832e5f1136a32273da1571e48bc0eeeb2564bc03

Contents?: true

Size: 753 Bytes

Versions: 6

Compression:

Stored size: 753 Bytes

Contents

require 'test_helper'

module SocialUrl
  class PinterestTest < Minitest::Test
    def setup
      @options = {
        url: 'http://www.flickr.com/photos/kentbrew/6851755809/',
        media: 'http://farm8.staticflickr.com/7027/6851755809_df5b2051c9_z.jpg',
        description: 'Next stop: Pinterest'
      }
    end

    def test_url
      opts = SocialUrl.normalize(@options)
      url = ['https://www.pinterest.com/pin/create/button/',
              '?url=http%3A%2F%2Fwww.flickr.com%2Fphotos%2Fkentbrew%2F6851755809%2F',
              '&media=http%3A%2F%2Ffarm8.staticflickr.com%2F7027%2F6851755809_df5b2051c9_z.jpg',
              '&description=Next%20stop%3A%20Pinterest'].join

      assert_equal url, Pinterest.new(opts).url
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
social-url-1.1.0 test/lib/social_url/pinterest_test.rb
social-url-1.0.3 test/lib/social_url/pinterest_test.rb
social-url-1.0.2 test/lib/social_url/pinterest_test.rb
social-url-1.0.1 test/lib/social_url/pinterest_test.rb
social-url-1.0.0 test/lib/social_url/pinterest_test.rb
social-url-0.3.0 test/lib/social_url/pinterest_test.rb