mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-11 18:26:50 +00:00
Spec DFC endpoint configuration
It looks like puma finds the file only under `/.well-known/dfc` and not `/.well-known/dfc/` with a slash in staging environment while it works here in dev and test. And in any case, just placing the file in `public/` doesn't produce the right content type.
This commit is contained in:
15
spec/requests/well_known_spec.rb
Normal file
15
spec/requests/well_known_spec.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe "/.well-known/" do
|
||||
describe "dfc/" do
|
||||
it "publishes our endpoints" do
|
||||
get "/.well-known/dfc/"
|
||||
|
||||
expect(response).to have_http_status :ok
|
||||
expect(response.content_type).to eq "text/plain" # Should be JSON!
|
||||
expect(response.body).to include "ReadEnterprise"
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user