From 695bb7c3c59fd88feb169285061554adf8338198 Mon Sep 17 00:00:00 2001 From: Steve Taylor Date: Wed, 11 Dec 2024 10:14:15 -0800 Subject: [PATCH] Add namespace to the url helper --- app/helpers/spotlight/meta_helper.rb | 2 +- spec/helpers/spotlight/meta_helper_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/spotlight/meta_helper.rb b/app/helpers/spotlight/meta_helper.rb index 511c78056..32c8235c3 100644 --- a/app/helpers/spotlight/meta_helper.rb +++ b/app/helpers/spotlight/meta_helper.rb @@ -30,7 +30,7 @@ def add_exhibit_meta_content def exhibit_twitter_card_content card('twitter') do |card| card['card'] = 'summary' - card['url'] = exhibit_root_url(current_exhibit) + card['url'] = spotlight.exhibit_root_url(current_exhibit) card['title'] = current_exhibit.title card['description'] = current_exhibit.subtitle card['image'] = meta_image if current_exhibit.thumbnail diff --git a/spec/helpers/spotlight/meta_helper_spec.rb b/spec/helpers/spotlight/meta_helper_spec.rb index 29acc2670..8ab289cdf 100644 --- a/spec/helpers/spotlight/meta_helper_spec.rb +++ b/spec/helpers/spotlight/meta_helper_spec.rb @@ -12,7 +12,7 @@ end it 'generates a twitter card for the exhibit' do - allow(helper).to receive(:exhibit_root_url).and_return('some/url') + allow(helper).to receive(:spotlight).and_return(double(exhibit_root_url: 'some/url')) allow(current_exhibit).to receive(:thumbnail).and_return(double(iiif_url: 'https://test.host/images/7777/full/400,300/0/default.jpg')) helper.add_exhibit_meta_content