From cf00da9f8bfb0538f6997335583fc248f7e10648 Mon Sep 17 00:00:00 2001 From: Mark Dodwell Date: Sat, 28 Dec 2013 14:53:32 -0800 Subject: [PATCH] simplify test for image size option --- test/test.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/test/test.rb b/test/test.rb index 65f0565..a154adc 100644 --- a/test/test.rb +++ b/test/test.rb @@ -115,13 +115,7 @@ class InfoTest < StrategyTestCase @options = { :image_size => { :width => 123, :height => 987 } } raw_info = { 'name' => 'Fred Smith', 'id' => '321' } strategy.stubs(:raw_info).returns(raw_info) - image_url = strategy.info['image'] - path, query = image_url.split("?") - query_params = Hash[*query.split("&").map {|pair| pair.split("=") }.flatten] - - assert_equal 'http://graph.facebook.com/321/picture', path - assert_equal '123', query_params['width'] - assert_equal '987', query_params['height'] + assert_equal 'http://graph.facebook.com/321/picture?width=123&height=987', strategy.info['image'] end end