require 'rails_helper' RSpec.describe 'Removed standalone Wiki resources', type: :request do include TagGroupRecords let(:user) { create_member_user! } ['Help:old', 'ヘルプ:旧ページ'].each do |title| it "does not resolve #{ title } as a Wiki resource" do path = "/wiki/title/#{ CGI.escapeURIComponent(title) }" without_group_legacy_reads { get path } expect(response).to have_http_status(:not_found) get "#{ path }/exists" expect(response).to have_http_status(:not_found) end it "rejects standalone creation of #{ title } without writes" do user before_state = group_state post '/wiki', params: { title:, body: 'body' }, headers: { 'X-Transfer-Code' => user.inheritance_code } expect(response).to have_http_status(:unprocessable_entity) expect(group_state).to eq(before_state) end end end