Add tests for user requirement in questions
This commit is contained in:
parent
a705543d89
commit
93fcebe6c0
|
@ -175,6 +175,19 @@ describe UseCase::Question::Create do
|
||||||
it_behaves_like "invalid params"
|
it_behaves_like "invalid params"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context "target user does not allow non-logged in questions" do
|
||||||
|
let(:allow_anon) { true }
|
||||||
|
let(:anonymous) { true }
|
||||||
|
let(:content) { "Hello world" }
|
||||||
|
let(:author_identifier) { "qwerty" }
|
||||||
|
|
||||||
|
before do
|
||||||
|
target_user.update!(privacy_require_user: true)
|
||||||
|
end
|
||||||
|
|
||||||
|
it_behaves_like "forbidden"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue