mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Publish enterprise website with https://
This commit is contained in:
@@ -23,6 +23,9 @@ class EnterpriseBuilder < DfcBuilder
|
||||
socialMedias: SocialMediaBuilder.social_medias(enterprise),
|
||||
websites: [enterprise.website].compact,
|
||||
).tap do |e|
|
||||
# The model strips the protocol and we need to add it:
|
||||
e.websites = e.websites.map { |url| "https://#{url}" }
|
||||
|
||||
add_ofn_property(e, "ofn:long_description", enterprise.long_description)
|
||||
|
||||
# This could be expressed as dfc-b:hasMainContact Person with name.
|
||||
|
||||
@@ -71,6 +71,7 @@ describe "Enterprises", type: :request, swagger_doc: "dfc.yaml", rswag_autodoc:
|
||||
|
||||
expect(json_response["@graph"][0]).to include(
|
||||
"dfc-b:affiliates" => "http://test.host/api/dfc/enterprise_groups/60000",
|
||||
"dfc-b:websitePage" => "https://openfoodnetwork.org",
|
||||
)
|
||||
|
||||
# Insert static value to keep documentation deterministic:
|
||||
|
||||
@@ -376,7 +376,7 @@ paths:
|
||||
dfc-b:hasAddress: http://test.host/api/dfc/addresses/40000
|
||||
dfc-b:hasPhoneNumber: 0404 444 000 200
|
||||
dfc-b:email: hello@example.org
|
||||
dfc-b:websitePage: openfoodnetwork.org
|
||||
dfc-b:websitePage: https://openfoodnetwork.org
|
||||
dfc-b:hasSocialMedia: http://test.host/api/dfc/enterprises/10000/social_medias/facebook
|
||||
dfc-b:logo: ''
|
||||
dfc-b:name: Fred's Farm
|
||||
|
||||
Reference in New Issue
Block a user