Skip to content

Commit

Permalink
test now reflects we arent fixing this via api, but via client and ba…
Browse files Browse the repository at this point in the history
…se64
  • Loading branch information
epugh committed Sep 13, 2019
1 parent cf589c7 commit d4a05b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/integration/api/rating_documents_flow_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d4a05b7

Please sign in to comment.