test/supr_test.rb in shorty-0.1.1 vs test/supr_test.rb in shorty-0.1.2
- old
+ new
@@ -47,9 +47,13 @@
context "when using class methods" do
should "return a shortened url" do
assert_equal 'http://su.pr/2yw2PP', Shorty::Supr.shorten('http://cnn.com')
end
+
+ should "return a shortened hash" do
+ assert_equal '2yw2PP', Shorty::Supr.shorten('http://cnn.com', false)
+ end
should "return an expanded url when passed a hash" do
assert_equal 'http://cnn.com/', Shorty::Supr.expand('2yw2PP')
end