Skip to content
Permalink
Browse files

api cache

  • Loading branch information...
briandunn committed Aug 14, 2009
1 parent 4ab61e6 commit 985be15be4cf35e8837772001dc43c1872822eea
Showing with 6 additions and 4 deletions.
  1. +5 −3 lib/net_flix/request.rb
  2. +1 −1 test/request_test.rb
@@ -29,9 +29,11 @@ def log
end

def send
authenticator.sign!
log
APICache.get(target.to_s)
APICache.get(target.to_s) do
authenticator.sign!
log
Net::HTTP.get(target)
end
end

def self.encode(value)
@@ -18,7 +18,7 @@ def test_that_parameters_appear_alphabetically_in_parameter_string
def test_that_authenticator_receives_copy_of_request
request = NetFlix::Request.new(:parameters => {'key1' => '2'})
NetFlix::Authenticator.expects(:new).with(has_entry(:request, request)).returns(stub_everything)
APICache.stubs(:get)
Net::HTTP.stubs(:get)

request.send
end

0 comments on commit 985be15

Please sign in to comment.
You can’t perform that action at this time.