From a60fdc8ccdd4ca614c1c594ef34eef8305279c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 18 Sep 2015 12:34:14 +0200 Subject: [PATCH] sets debate's title as title page in debate/show --- app/views/debates/show.html.erb | 1 + spec/features/debates_spec.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/views/debates/show.html.erb b/app/views/debates/show.html.erb index c15b5b709..a1920646e 100644 --- a/app/views/debates/show.html.erb +++ b/app/views/debates/show.html.erb @@ -1,3 +1,4 @@ +<% provide :title do %><%= @debate.title %><% end %> <% cache [locale_and_user_status(@debate), @debate, @debate.author, Flag.flagged?(current_user, @debate), @debate_votes] do %>
diff --git a/spec/features/debates_spec.rb b/spec/features/debates_spec.rb index 5b1069a66..08ff1d8c1 100644 --- a/spec/features/debates_spec.rb +++ b/spec/features/debates_spec.rb @@ -44,6 +44,7 @@ feature 'Debates' do expect(page).to have_content debate.author.name expect(page).to have_content I18n.l(debate.created_at.to_date) expect(page).to have_selector(avatar(debate.author.name)) + expect(page.html).to include "#{debate.title}" within('.social-share-button') do expect(page.all('a').count).to be(3) # Twitter, Facebook, Google+