Adds specs for creating failed officing census calls

This commit is contained in:
kikito
2017-02-08 14:55:44 +01:00
parent 871846c070
commit 8ca4cc22b0
3 changed files with 26 additions and 4 deletions

View File

@@ -8,7 +8,7 @@ class Officing::ResidenceController < Officing::BaseController
end
def create
@residence = Officing::Residence.new(residence_params)
@residence = Officing::Residence.new(residence_params.merge(officer: current_user.poll_officer))
if @residence.save
redirect_to new_officing_voter_path(id: @residence.user.id), notice: t("officing.residence.flash.create")
else
@@ -34,4 +34,4 @@ class Officing::ResidenceController < Officing::BaseController
redirect_to officing_root_path, notice: t("officing.residence.flash.not_allowed")
end
end
end
end