mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
FIX: return 429 when admin api key is limited on admin route
This also handles a general case where exceptions leak out prior to being handled by the application controller
This commit is contained in:
parent
dcbaf2f213
commit
49ed382c2a
39 changed files with 322 additions and 349 deletions
|
@ -6,11 +6,10 @@ RSpec.describe ComposerController do
|
|||
describe '#parse_html' do
|
||||
|
||||
it "should not be able access without sign in" do
|
||||
expect {
|
||||
post "/composer/parse_html.json", params: {
|
||||
html: "<strong>hello</strong>"
|
||||
}
|
||||
}.to raise_error(Discourse::NotLoggedIn)
|
||||
post "/composer/parse_html.json", params: {
|
||||
html: "<strong>hello</strong>"
|
||||
}
|
||||
expect(response.status).to eq(403)
|
||||
end
|
||||
|
||||
it "should convert html tags to markdown text" do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue