From 478b048fc5aa0c5607e8f3491e68811a46f044bf Mon Sep 17 00:00:00 2001 From: Ben Halpern Date: Wed, 17 Jun 2020 20:10:41 -0400 Subject: [PATCH] [deploy] Fix article preamble style (#8756) * Fix article preamble style * Proper tests --- app/views/articles/show.html.erb | 2 +- spec/requests/stories_show_spec.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/articles/show.html.erb b/app/views/articles/show.html.erb index 059962661..5cec4c74c 100644 --- a/app/views/articles/show.html.erb +++ b/app/views/articles/show.html.erb @@ -129,7 +129,7 @@ <% end %>

<% if @article.search_optimized_title_preamble.present? && !user_signed_in? %> - <%= @article.search_optimized_title_preamble %> + <%= @article.search_optimized_title_preamble %> <% end %> <%= sanitize_and_decode @article.title %>

diff --git a/spec/requests/stories_show_spec.rb b/spec/requests/stories_show_spec.rb index d536e96ce..7f1c5005c 100644 --- a/spec/requests/stories_show_spec.rb +++ b/spec/requests/stories_show_spec.rb @@ -54,19 +54,19 @@ RSpec.describe "StoriesShow", type: :request do it "renders title preamble with search_optimized_title_preamble if set and not signed in" do article.update_column(:search_optimized_title_preamble, "Hey this is a test") get article.reload.path - expect(response.body).to include "Hey this is a test" + expect(response.body).to include "Hey this is a test" end it "does not render preamble with search_optimized_title_preamble if set and signed in" do sign_in user article.update_column(:search_optimized_title_preamble, "Hey this is a test") get article.path - expect(response.body).not_to include "Hey this is a test" + expect(response.body).not_to include "Hey this is a test" end it "does not render title tag with search_optimized_title_preamble not signed in but search_optimized_title_preamble not set" do get article.path - expect(response.body).not_to include "Hey this is a test" + expect(response.body).not_to include "Hey this is a test" end it "renders user payment pointer if set" do