sets debate's title as title page in debate/show

This commit is contained in:
Juanjo Bazán
2015-09-18 12:34:14 +02:00
parent cd5847f263
commit a60fdc8ccd
2 changed files with 2 additions and 0 deletions

View File

@@ -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 %>
<section class="debate-show">
<div id="<%= dom_id(@debate) %>" class="row">

View File

@@ -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 "<title>#{debate.title}</title>"
within('.social-share-button') do
expect(page.all('a').count).to be(3) # Twitter, Facebook, Google+