Skip to content

Commit

Permalink
fix: Add README entry for new task
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentinchampenois committed Oct 17, 2024
1 parent f974950 commit ae321c8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ if you are using sidekiq scheduler you can use the following configuration:
queue: scheduled
```

### Block already marked users

If you want to block already marked users, you can use the following command:
```bash
bundle exec rake decidim:spam_detection:block_users
```

### Further configuration
list of env var, default value and their usage:
```
Expand Down
File renamed without changes.
19 changes: 19 additions & 0 deletions spec/lib/tasks/decidim_block_user_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# frozen_string_literal: true

require "spec_helper"

describe "decidim:spam_detection:block_users", type: :task do
it "preloads the Rails environment" do
expect(task.prerequisites).to include "environment"
end

it "runs gracefully" do
expect { task.execute }.not_to raise_error
end

it "performs the job" do
expect(Decidim::SpamDetection::BlockUsersJob).to receive(:perform_later)

task.execute
end
end

0 comments on commit ae321c8

Please sign in to comment.