Merge remote-tracking branch 'parent/main' into upstream-20240926

This commit is contained in:
KMY 2024-09-26 08:29:41 +09:00
commit c905714459
517 changed files with 4284 additions and 3891 deletions

View file

@ -46,6 +46,8 @@ RSpec.describe 'Lists' do
subject
expect(response).to have_http_status(200)
expect(response.content_type)
.to start_with('application/json')
expect(response.parsed_body).to match_array(expected_response)
end
end
@ -63,6 +65,8 @@ RSpec.describe 'Lists' do
subject
expect(response).to have_http_status(200)
expect(response.content_type)
.to start_with('application/json')
expect(response.parsed_body).to match({
id: list.id.to_s,
title: list.title,
@ -80,6 +84,8 @@ RSpec.describe 'Lists' do
subject
expect(response).to have_http_status(404)
expect(response.content_type)
.to start_with('application/json')
end
end
@ -88,6 +94,8 @@ RSpec.describe 'Lists' do
get '/api/v1/lists/-1', headers: headers
expect(response).to have_http_status(404)
expect(response.content_type)
.to start_with('application/json')
end
end
end
@ -105,6 +113,8 @@ RSpec.describe 'Lists' do
subject
expect(response).to have_http_status(200)
expect(response.content_type)
.to start_with('application/json')
expect(response.parsed_body).to match(a_hash_including(title: 'my list', replies_policy: 'none', exclusive: true))
expect(List.where(account: user.account).count).to eq(1)
end
@ -116,6 +126,8 @@ RSpec.describe 'Lists' do
subject
expect(response).to have_http_status(422)
expect(response.content_type)
.to start_with('application/json')
end
end
@ -126,6 +138,8 @@ RSpec.describe 'Lists' do
subject
expect(response).to have_http_status(422)
expect(response.content_type)
.to start_with('application/json')
end
end
end
@ -147,6 +161,8 @@ RSpec.describe 'Lists' do
.and change_list_exclusive
expect(response).to have_http_status(200)
expect(response.content_type)
.to start_with('application/json')
list.reload
expect(response.parsed_body).to match({
@ -176,6 +192,8 @@ RSpec.describe 'Lists' do
put '/api/v1/lists/-1', headers: headers, params: params
expect(response).to have_http_status(404)
expect(response.content_type)
.to start_with('application/json')
end
end
@ -186,6 +204,8 @@ RSpec.describe 'Lists' do
subject
expect(response).to have_http_status(404)
expect(response.content_type)
.to start_with('application/json')
end
end
end
@ -203,6 +223,8 @@ RSpec.describe 'Lists' do
subject
expect(response).to have_http_status(200)
expect(response.content_type)
.to start_with('application/json')
expect(List.where(id: list.id)).to_not exist
end
@ -221,6 +243,8 @@ RSpec.describe 'Lists' do
subject
expect(response).to have_http_status(404)
expect(response.content_type)
.to start_with('application/json')
end
end
end