mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
SECURITY: Convert send_digest to a post request (#19746)
Co-authored-by: Isaac Janzen <isaac.janzen@discourse.org>
This commit is contained in:
committed by
GitHub
parent
c2013865d7
commit
cf862e7365
@@ -337,6 +337,19 @@ RSpec.describe Admin::EmailController do
|
||||
end
|
||||
end
|
||||
|
||||
describe '#send_digest' do
|
||||
context "when logged in as an admin" do
|
||||
before { sign_in(admin) }
|
||||
|
||||
it "sends the digest" do
|
||||
post "/admin/email/send-digest.json", params: {
|
||||
last_seen_at: 1.week.ago, username: admin.username, email: email('previous_replies')
|
||||
}
|
||||
expect(response.status).to eq(200)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#handle_mail' do
|
||||
context "when logged in as an admin" do
|
||||
before { sign_in(admin) }
|
||||
|
||||
Reference in New Issue
Block a user