Stub current_user in all component tests

The `sign_in(nil)` method was a bit hard to understand IMHO. After all,
in controller and system tests we don't have to specify no user is
signed in; that's the default behavior.

So we're making it the default behavior for component tests as well.
This commit is contained in:
Javi Martín
2021-09-04 15:35:12 +02:00
parent e97c375063
commit 9247a31e85
7 changed files with 4 additions and 10 deletions

View File

@@ -7,7 +7,6 @@ describe MachineLearning::CommentsSummaryComponent do
before do
Setting["feature.machine_learning"] = true
Setting["machine_learning.comments_summary"] = true
sign_in(nil)
end
it "is displayed when the setting is enabled" do