5556: add test to invoke collection#show with and without include_accept_encoding_hea...
authorRadhika Chippada <radhika@curoverse.com>
Wed, 25 Mar 2015 15:02:25 +0000 (11:02 -0400)
committerRadhika Chippada <radhika@curoverse.com>
Wed, 25 Mar 2015 15:02:25 +0000 (11:02 -0400)
apps/workbench/test/controllers/application_controller_test.rb

index 47213169d5b2d94b4129d6f2b324ffda6001d000..978524393124792269beafeeaee0393a282377fd 100644 (file)
@@ -362,4 +362,18 @@ class ApplicationControllerTest < ActionController::TestCase
       end
     end
   end
+
+  [
+    true,
+    false,
+  ].each do |config|
+    test "invoke show with include_accept_encoding_header config #{config}" do
+      Rails.configuration.include_accept_encoding_header_in_api_requests = config
+
+      @controller = CollectionsController.new
+      get(:show, {id: api_fixture('collections')['foo_file']['uuid']}, session_for(:admin))
+
+      assert_equal([['.', 'foo', 3]], assigns(:object).files)
+    end
+  end
 end