Tighten inbox entry view spec

Non-direct questions can't have a non-null answer count
This commit is contained in:
Andreas Nedbal 2023-10-21 00:53:30 +02:00 committed by Andreas Nedbal
parent 80477d17ac
commit 778d4c7b44
1 changed files with 1 additions and 1 deletions

View File

@ -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 }