Specs added to test the functionality and some UI modified to make test pass

This commit is contained in:
iagirre
2017-10-30 16:50:25 +01:00
parent 1077e25b2b
commit 4b8a471d38
3 changed files with 68 additions and 4 deletions

View File

@@ -14,8 +14,8 @@
method: :delete,
remote: true,
title: t("admin.booth_assignments.manage.actions.unassign"),
class: "button hollow alert #{@poll.expired? ? 'disabled' : ''}",
data: (booth_assignment.shifts? ? {confirm: "#{t("admin.poll_booth_assignments.alert.shifts")}"} : nil) %>
class: "button hollow alert",
data: (booth_assignment.shifts? ? {confirm: "#{t("admin.poll_booth_assignments.alert.shifts")}"} : nil) if !@poll.expired? %>
</td>
<% else %>
<td>
@@ -27,6 +27,6 @@
method: :post,
remote: true,
title: t("admin.booth_assignments.manage.actions.assign"),
class: "button #{@poll.expired? ? 'disabled' : ''}" %>
class: "button" if !@poll.expired? %>
</td>
<% end %>