From b893c0bacef22fd4281089b15b3d0d810e94c508 Mon Sep 17 00:00:00 2001 From: Bertocq Date: Tue, 3 Oct 2017 23:45:02 +0200 Subject: [PATCH] Add shift task presence validation expectation --- spec/models/poll/shift_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/models/poll/shift_spec.rb b/spec/models/poll/shift_spec.rb index b62f220da..686dc41db 100644 --- a/spec/models/poll/shift_spec.rb +++ b/spec/models/poll/shift_spec.rb @@ -24,6 +24,11 @@ describe :shift do expect(shift).to_not be_valid end + it "should not be valid without a task" do + shift.task = nil + expect(shift).to_not be_valid + end + end describe "officer_assignments" do