Fix styles for poll dates
We accidentally introduced a typo in commit f497227e3 which caused the
dates to be rendered outside the element where the dates styles are
applied.
This commit is contained in:
@@ -27,13 +27,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="small-12 medium-6 column" data-equalizer-watch>
|
<div class="small-12 medium-6 column" data-equalizer-watch>
|
||||||
<div class="dates"></div>
|
|
||||||
<% if poll.questions.one? %>
|
<% if poll.questions.one? %>
|
||||||
<h4><%= link_to_poll poll.questions.first.title, poll %></h4>
|
<h4><%= link_to_poll poll.questions.first.title, poll %></h4>
|
||||||
<%= dates %>
|
<div class="dates"><%= dates %></div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<h4><%= link_to_poll poll.name, poll %></h4>
|
<h4><%= link_to_poll poll.name, poll %></h4>
|
||||||
<%= dates %>
|
<div class="dates"><%= dates %></div>
|
||||||
|
|
||||||
<ul class="margin-top">
|
<ul class="margin-top">
|
||||||
<% poll.questions.sort_for_list.each do |question| %>
|
<% poll.questions.sort_for_list.each do |question| %>
|
||||||
|
|||||||
@@ -42,6 +42,14 @@ describe Polls::PollComponent do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "renders the dates inside an HTML tag" do
|
||||||
|
poll = create(:poll, starts_at: "2015-07-15", ends_at: "2015-07-22")
|
||||||
|
|
||||||
|
render_inline Polls::PollComponent.new(poll)
|
||||||
|
|
||||||
|
expect(page).to have_css ".dates", exact_text: "From 2015-07-15 to 2015-07-22"
|
||||||
|
end
|
||||||
|
|
||||||
it "shows a link to poll stats if enabled" do
|
it "shows a link to poll stats if enabled" do
|
||||||
poll = create(:poll, :expired, name: "Poll with stats", stats_enabled: true)
|
poll = create(:poll, :expired, name: "Poll with stats", stats_enabled: true)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user