From 778d4c7b444d437ffb8c92d0479039b71d0a39f0 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sat, 21 Oct 2023 00:53:30 +0200 Subject: [PATCH] Tighten inbox entry view spec Non-direct questions can't have a non-null answer count --- spec/views/inbox/_entry.html.haml_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/views/inbox/_entry.html.haml_spec.rb b/spec/views/inbox/_entry.html.haml_spec.rb index 111cef6f..c8df132f 100644 --- a/spec/views/inbox/_entry.html.haml_spec.rb +++ b/spec/views/inbox/_entry.html.haml_spec.rb @@ -8,7 +8,7 @@ describe "inbox/_entry.html.haml", type: :view do let(:user) { FactoryBot.create(:user, sharing_enabled:, sharing_custom_url:) } let(:sharing_enabled) { true } let(:sharing_custom_url) { nil } - let(:question) { FactoryBot.create(:question, content: "owo what's this?", author_is_anonymous:, user: question_user, answer_count:) } + let(:question) { FactoryBot.create(:question, content: "owo what's this?", author_is_anonymous:, user: question_user, answer_count:, direct: false) } let(:author_is_anonymous) { true } let(:question_user) { nil } let(:answer_count) { 0 }