From 35e8e9da3141149307f8fd7e69911a60925abc58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sun, 20 Oct 2019 17:16:26 +0200 Subject: [PATCH] Fix validations being accidentally skipped in spec We were trying to test a before_validation call, but the `touch` method skips validations. --- spec/models/budget/investment_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/models/budget/investment_spec.rb b/spec/models/budget/investment_spec.rb index 4f87927d0..ae896819c 100644 --- a/spec/models/budget/investment_spec.rb +++ b/spec/models/budget/investment_spec.rb @@ -989,7 +989,7 @@ describe Budget::Investment do user.erase user.update!(document_number: nil) expect(user.document_number).to be_blank - investment.touch + investment.valid? expect(investment.responsible_name).to eq("123456") end end