From 0c5ff5b41df4617dc07c47b6771621d94e2ea3f9 Mon Sep 17 00:00:00 2001 From: Philipp Rothmann Date: Thu, 6 Oct 2022 12:27:34 +0200 Subject: [PATCH] Add test to delete article --- spec/models/article_spec.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spec/models/article_spec.rb b/spec/models/article_spec.rb index 526b5417..abf96ddf 100644 --- a/spec/models/article_spec.rb +++ b/spec/models/article_spec.rb @@ -9,6 +9,12 @@ describe Article do expect(article2).to be_invalid end + it 'can be deleted' do + expect(article).not_to be_deleted + article.mark_as_deleted + expect(article).to be_deleted + end + it 'computes the gross price correctly' do article.deposit = 0 article.tax = 12