mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 08:51:05 +08:00
FIX: Crazy large ids should not raise exceptions
This commit is contained in:
@ -578,6 +578,11 @@ describe TopicsController do
|
||||
expect(response.status).to eq(404)
|
||||
end
|
||||
|
||||
it 'returns a 404 for an ID that is larger than postgres limits' do
|
||||
xhr :get, :show, topic_id: 50142173232201640412, slug: 'topic-that-is-made-up'
|
||||
expect(response.status).to eq(404)
|
||||
end
|
||||
|
||||
context 'a topic with nil slug exists' do
|
||||
before do
|
||||
@nil_slug_topic = Fabricate(:topic)
|
||||
|
Reference in New Issue
Block a user