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+