mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FIX: update id types in API docs to integers (#27412)
This commit is contained in:
@ -117,7 +117,7 @@ RSpec.describe "posts" do
|
||||
type: %i[string null],
|
||||
},
|
||||
flair_group_id: {
|
||||
type: %i[string null],
|
||||
type: %i[integer null],
|
||||
},
|
||||
version: {
|
||||
type: :integer,
|
||||
@ -191,7 +191,7 @@ RSpec.describe "posts" do
|
||||
type: :boolean,
|
||||
},
|
||||
reviewable_id: {
|
||||
type: %i[string null],
|
||||
type: %i[integer null],
|
||||
},
|
||||
reviewable_score_count: {
|
||||
type: :integer,
|
||||
@ -261,6 +261,29 @@ RSpec.describe "posts" do
|
||||
let(:expected_request_schema) { expected_request_schema }
|
||||
end
|
||||
end
|
||||
|
||||
response "200", "single reviewable post" do
|
||||
expected_response_schema = load_spec_schema("post_show_response")
|
||||
schema expected_response_schema
|
||||
|
||||
let(:id) do
|
||||
topic = Fabricate(:topic)
|
||||
post = Fabricate(:post, topic: topic)
|
||||
Fabricate(:reviewable_flagged_post, topic: topic, target: post)
|
||||
|
||||
post.id
|
||||
end
|
||||
|
||||
let(:moderator) { Fabricate(:moderator) }
|
||||
before { sign_in(moderator) }
|
||||
|
||||
run_test!
|
||||
|
||||
it_behaves_like "a JSON endpoint", 200 do
|
||||
let(:expected_response_schema) { expected_response_schema }
|
||||
let(:expected_request_schema) { expected_request_schema }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
put "Update a single post" do
|
||||
@ -570,7 +593,7 @@ RSpec.describe "posts" do
|
||||
type: :object,
|
||||
},
|
||||
reviewable_id: {
|
||||
type: %i[string null],
|
||||
type: %i[integer null],
|
||||
},
|
||||
reviewable_score_count: {
|
||||
type: :integer,
|
||||
|
Reference in New Issue
Block a user