Sha256: 038db6b888d6e1d500645018fa028f842d3903b2d2adfeaafcee21168b757644
Contents?: true
Size: 745 Bytes
Versions: 6
Compression:
Stored size: 745 Bytes
Contents
# encoding: utf-8 require_relative './helper' require 'vcr' VCR.configure do |c| c.cassette_library_dir = "#{File.dirname(__FILE__)}/fixtures-vcr" c.hook_into :webmock end class BitlifyTest < Test::Unit::TestCase def test_limit_exceeded VCR.use_cassette('bitly_limit_exceeded') do assert_equal("http://radiospiel.org/foo", Bitly.shorten("http://radiospiel.org/foo")) end end def test_ok VCR.use_cassette('bitly_ok') do assert_equal("http://bit.ly/HV7woD", Bitly.shorten("http://radiospiel.org/a=1&b=2")) end end def test_url_base expected = "https://api-ssl.bitly.com/v3/shorten?login=bitlyapidemo&apiKey=R_0da49e0a9118ff35f52f629d2d71bf07" assert_equal expected, Bitly.url_base end end
Version data entries
6 entries across 6 versions & 2 rubygems