このコミットが含まれているのは:
@@ -232,10 +232,9 @@ RSpec.describe 'Materials API', type: :request do
|
||||
expect(current_description_version(page).body).to eq('legacy body')
|
||||
end
|
||||
|
||||
it 'uses tag_id rather than description ID without a Wiki page or TagName' do
|
||||
it 'uses tag_id rather than description Id. without a Wiki page' do
|
||||
description = TagDescription.create!(tag:, language_code: 'ja',
|
||||
body: 'independent body', version_no: 1)
|
||||
tag.tag_names.delete_all
|
||||
get_material_without_legacy_reads
|
||||
expect(json.fetch('wiki_page_body')).to eq('independent body')
|
||||
expect(json.fetch('tag').fetch('has_wiki')).to be(true)
|
||||
|
||||
@@ -46,12 +46,14 @@ RSpec.describe 'Tag resource ID allocation', type: :request do
|
||||
|
||||
it 'preserves resource and old revision identity on an update' do
|
||||
description = create_description('stable')
|
||||
original_resource_id = description.id
|
||||
original = current_description_version(description)
|
||||
snapshot = original.attributes
|
||||
put "/wiki/#{ description.id }", params: {
|
||||
title: 'stable', body: 'after', base_revision_id: original.id }, headers: headers
|
||||
put "/wiki/#{ description.id }",
|
||||
params: { title: 'stable', body: 'after', base_revision_id: original.id },
|
||||
headers: headers
|
||||
expect(response).to have_http_status(:ok)
|
||||
expect(json.fetch('id')).to eq(description.id)
|
||||
expect(description.reload.id).to eq(original_resource_id)
|
||||
expect(description.reload).to have_attributes(body: 'after', version_no: 2)
|
||||
expect(original.reload.attributes).to eq(snapshot)
|
||||
expect(current_description_version(description).id).to be > original.id
|
||||
|
||||
@@ -453,7 +453,6 @@ RSpec.describe 'Wiki API', type: :request do
|
||||
headers: auth_headers(user)
|
||||
}
|
||||
.to change(TagDescriptionVersion, :count).by(1)
|
||||
|
||||
.and change { linked_tag.reload.tag_versions.count }.by(2)
|
||||
|
||||
expect(response).to have_http_status(:ok)
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする