test/facebook/test_parse.rb in rest-more-2.0.4 vs test/facebook/test_parse.rb in rest-more-3.0.0
- old
+ new
@@ -132,16 +132,9 @@
setup_sr(secret, 'code' => code, 'user_id' => user_id))
check.call
end
end
- should 'fallback to ruby-hmac if Digest.new raise an runtime error' do
- key, data = 'top', 'secret'
- digest = OpenSSL::HMAC.digest('sha256', key, data)
- mock(OpenSSL::HMAC).digest('sha256', key, data){ raise 'boom' }
- RC::Hmac.sha256(key, data).should.eq digest
- end
-
should 'generate correct fbs with correct sig' do
RC::Facebook.new(:access_token => 'fake', :secret => 's').fbs.
should.eq \
"access_token=fake&sig=#{Digest::MD5.hexdigest('access_token=fakes')}"
end