From d4a05b72b1dd33d73b936c44d53ff5531fa80054 Mon Sep 17 00:00:00 2001 From: epugh Date: Fri, 13 Sep 2019 15:40:27 -0400 Subject: [PATCH] test now reflects we arent fixing this via api, but via client and base64 --- test/integration/api/rating_documents_flow_test.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/integration/api/rating_documents_flow_test.rb b/test/integration/api/rating_documents_flow_test.rb index 223b6bfd6..5a024a4c8 100644 --- a/test/integration/api/rating_documents_flow_test.rb +++ b/test/integration/api/rating_documents_flow_test.rb @@ -16,10 +16,11 @@ class RatingDocumentsFlowTest < ActionDispatch::IntegrationTest { controller: "api/v1/queries/ratings", action: "update", format: :json, case_id: "44", "query_id": "62", doc_id: "mydoc" } ) - # a period in the URL should work as well, and not be truncated. + # A period in the doc_id should work, however Rails assumes that post the dot is the format type. We deal with this by + # Base64 encoding in the Angular front end and decoding in ratings controller. assert_routing( { method: 'put', path: "/api/cases/44/queries/62/ratings/mydoc.pdf" }, - { controller: "api/v1/queries/ratings", action: "update", format: :json, case_id: "44", "query_id": "62", doc_id: "mydoc.pdf" } + { controller: "api/v1/queries/ratings", action: "update", "format": "pdf", case_id: "44", "query_id": "62", doc_id: "mydoc" } ) end end