Skip to content
Browse files

Fix VersionsController tests

  • Loading branch information...
1 parent 702d5a5 commit 0c4e1ff529344930a6acd17118fdb8fe20e3fd09 @sferik sferik committed Nov 5, 2013
Showing with 5 additions and 4 deletions.
  1. +5 −4 test/functional/api/v1/versions_controller_test.rb
View
9 test/functional/api/v1/versions_controller_test.rb
@@ -13,6 +13,11 @@ def get_reverse_dependencies(rubygem, options={ :format => 'json' })
get :reverse_dependencies, options.merge(:id => rubygem.name)
end
+ def set_cache_header(timestamp)
+ ims = ActionDispatch::Http::Cache::Request::HTTP_IF_MODIFIED_SINCE
+ request.env[ims] = timestamp.httpdate
+ end
+
def self.should_respond_to(format)
context "with #{format.to_s.upcase}" do
should "have a list of versions for the first gem" do
@@ -84,10 +89,6 @@ def self.should_respond_to(format)
assert_response :success
end
- def set_cache_header(timestamp)
- ims = ActionDispatch::Http::Cache::Request::HTTP_IF_MODIFIED_SINCE
- request.env[ims] = timestamp.httpdate
- end
end
context "on GET to show for an unknown gem" do

0 comments on commit 0c4e1ff

Please sign in to comment.
Something went wrong with that request. Please try again.