From 709a6aaab8cc8325f9c6f9fd104582ef9a57358e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 12:24:29 +0000 Subject: [PATCH 1/2] Bump rubocop-rspec_rails from 2.31.0 to 2.32.0 Bumps [rubocop-rspec_rails](https://github.com/rubocop/rubocop-rspec_rails) from 2.31.0 to 2.32.0. - [Release notes](https://github.com/rubocop/rubocop-rspec_rails/releases) - [Changelog](https://github.com/rubocop/rubocop-rspec_rails/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-rspec_rails/compare/v2.31.0...v2.32.0) --- updated-dependencies: - dependency-name: rubocop-rspec_rails dependency-version: 2.32.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 47288598..8f58d7be 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -487,7 +487,7 @@ GEM rubocop-rspec (3.6.0) lint_roller (~> 1.1) rubocop (~> 1.72, >= 1.72.1) - rubocop-rspec_rails (2.31.0) + rubocop-rspec_rails (2.32.0) lint_roller (~> 1.1) rubocop (~> 1.72, >= 1.72.1) rubocop-rspec (~> 3.5) From d1a5fa4c14f45492e27dcd024a9269f807fe8bae Mon Sep 17 00:00:00 2001 From: Chris Zetter <253059100+zetter-rpf@users.noreply.github.com> Date: Mon, 2 Mar 2026 14:31:11 +0000 Subject: [PATCH 2/2] Autocorrect failing cops --- .../creating_a_batch_of_class_members_spec.rb | 2 +- .../class_member/creating_a_class_member_spec.rb | 6 +++--- spec/features/feedback/creating_feedback_spec.rb | 2 +- .../lesson/creating_a_copy_of_a_lesson_spec.rb | 2 +- spec/features/lesson/creating_a_lesson_spec.rb | 8 ++++---- spec/features/lesson/updating_a_lesson_spec.rb | 4 ++-- spec/features/project/creating_a_project_spec.rb | 8 ++++---- spec/features/project/updating_a_project_spec.rb | 2 +- spec/features/school/creating_a_school_spec.rb | 2 +- spec/features/school/importing_schools_spec.rb | 2 +- spec/features/school/updating_a_school_spec.rb | 2 +- .../school_class/creating_a_school_class_spec.rb | 2 +- .../school_class/importing_a_school_class_spec.rb | 10 +++++----- .../school_class/updating_a_school_class_spec.rb | 2 +- spec/features/school_project/complete_spec.rb | 2 +- spec/features/school_project/return_spec.rb | 2 +- spec/features/school_project/submit_spec.rb | 2 +- spec/features/school_project/unsubmit_spec.rb | 2 +- .../batch_deleting_school_students_spec.rb | 2 +- .../creating_a_batch_of_school_students_spec.rb | 8 ++++---- .../school_student/creating_a_school_student_spec.rb | 2 +- .../school_teacher/inviting_a_school_teacher_spec.rb | 2 +- .../accepting_an_invitation_spec.rb | 4 ++-- spec/requests/api_controller_spec.rb | 2 +- spec/requests/projects/create_spec.rb | 2 +- spec/requests/projects/update_spec.rb | 6 +++--- 26 files changed, 45 insertions(+), 45 deletions(-) diff --git a/spec/features/class_member/creating_a_batch_of_class_members_spec.rb b/spec/features/class_member/creating_a_batch_of_class_members_spec.rb index 0f2e4003..95cbabff 100644 --- a/spec/features/class_member/creating_a_batch_of_class_members_spec.rb +++ b/spec/features/class_member/creating_a_batch_of_class_members_spec.rb @@ -181,7 +181,7 @@ it 'responds 422 Unprocessable Entity' do post("/api/schools/#{school.id}/classes/#{school_class.id}/members/batch", headers:, params: invalid_params) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'returns the error message in the operation response' do diff --git a/spec/features/class_member/creating_a_class_member_spec.rb b/spec/features/class_member/creating_a_class_member_spec.rb index 26bcd945..52e672d8 100644 --- a/spec/features/class_member/creating_a_class_member_spec.rb +++ b/spec/features/class_member/creating_a_class_member_spec.rb @@ -66,7 +66,7 @@ it 'responds 422 Unprocessable Entity' do post("/api/schools/#{school.id}/classes/#{school_class.id}/members", headers:, params: student_params) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'returns the error message from the operation response' do @@ -132,7 +132,7 @@ it 'responds 422 Unprocessable Entity' do post("/api/schools/#{school.id}/classes/#{school_class.id}/members", headers:, params: teacher_params) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'returns the error message from the operation response' do @@ -209,7 +209,7 @@ it 'responds 422 Unprocessable Entity when params are invalid' do post("/api/schools/#{school.id}/classes/#{school_class.id}/members", headers:, params: invalid_params) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'returns the error message in the operation response' do diff --git a/spec/features/feedback/creating_feedback_spec.rb b/spec/features/feedback/creating_feedback_spec.rb index 51d7b868..a6c1369e 100644 --- a/spec/features/feedback/creating_feedback_spec.rb +++ b/spec/features/feedback/creating_feedback_spec.rb @@ -70,7 +70,7 @@ end it 'returns unprocessable entity response' do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'does not add the feedback to the school project' do diff --git a/spec/features/lesson/creating_a_copy_of_a_lesson_spec.rb b/spec/features/lesson/creating_a_copy_of_a_lesson_spec.rb index 1e1cb0b2..061f1304 100644 --- a/spec/features/lesson/creating_a_copy_of_a_lesson_spec.rb +++ b/spec/features/lesson/creating_a_copy_of_a_lesson_spec.rb @@ -55,7 +55,7 @@ it 'responds 422 Unprocessable Entity when params are invalid' do post("/api/lessons/#{lesson.id}/copy", headers:, params: { lesson: { name: ' ' } }) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'responds 401 Unauthorized when no token is given' do diff --git a/spec/features/lesson/creating_a_lesson_spec.rb b/spec/features/lesson/creating_a_lesson_spec.rb index 30b39618..33d80c73 100644 --- a/spec/features/lesson/creating_a_lesson_spec.rb +++ b/spec/features/lesson/creating_a_lesson_spec.rb @@ -49,7 +49,7 @@ it 'responds 422 Unprocessable Entity when params are invalid' do post('/api/lessons', headers:, params: { lesson: { name: ' ' } }) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'responds 401 Unauthorized when no token is given' do @@ -151,14 +151,14 @@ new_params = { lesson: params[:lesson].without(:school_id) } post('/api/lessons', headers:, params: new_params) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'responds 422 Unprocessable if school_class_id does not correspond to school_id' do new_params = { lesson: params[:lesson].merge(school_id: SecureRandom.uuid) } post('/api/lessons', headers:, params: new_params) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'responds 403 Forbidden when the user is a school-owner for a different school' do @@ -183,7 +183,7 @@ new_params = { lesson: params[:lesson].merge(user_id:) } post('/api/lessons', headers:, params: new_params) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end end end diff --git a/spec/features/lesson/updating_a_lesson_spec.rb b/spec/features/lesson/updating_a_lesson_spec.rb index 948239e1..cb9eee05 100644 --- a/spec/features/lesson/updating_a_lesson_spec.rb +++ b/spec/features/lesson/updating_a_lesson_spec.rb @@ -42,7 +42,7 @@ it 'responds 422 Unprocessable Entity when params are invalid' do put("/api/lessons/#{lesson.id}", headers:, params: { lesson: { name: ' ' } }) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'responds 401 Unauthorized when no token is given' do @@ -125,7 +125,7 @@ new_params = { lesson: params[:lesson].merge(school_class_id: school_class.id) } put("/api/lessons/#{lesson.id}", headers:, params: new_params) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end end end diff --git a/spec/features/project/creating_a_project_spec.rb b/spec/features/project/creating_a_project_spec.rb index c8b671de..5332f9d0 100644 --- a/spec/features/project/creating_a_project_spec.rb +++ b/spec/features/project/creating_a_project_spec.rb @@ -53,7 +53,7 @@ it 'responds 422 Unprocessable Entity when params are invalid' do post('/api/projects', headers:, params: { project: { components: [{ name: ' ' }] } }) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'responds 401 Unauthorized when no token is given' do @@ -168,21 +168,21 @@ new_params = { project: project.merge(user_id:) } post('/api/projects', headers:, params: new_params) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'responds 422 Unprocessable when lesson_id is provided but school_id is missing' do new_params = { project: params[:project].without(:school_id) } post('/api/projects', headers:, params: new_params) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'responds 422 Unprocessable when lesson_id does not correspond to school_id' do new_params = { project: params[:project].merge(lesson_id: SecureRandom.uuid) } post('/api/projects', headers:, params: new_params) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'responds 403 Forbidden when the user is a school-owner for a different school' do diff --git a/spec/features/project/updating_a_project_spec.rb b/spec/features/project/updating_a_project_spec.rb index 871574a2..b674c323 100644 --- a/spec/features/project/updating_a_project_spec.rb +++ b/spec/features/project/updating_a_project_spec.rb @@ -48,7 +48,7 @@ it 'responds 422 Unprocessable Entity when params are invalid' do put("/api/projects/#{project.id}", headers:, params: { project: { components: [{ name: ' ' }] } }) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'responds 401 Unauthorized when no token is given' do diff --git a/spec/features/school/creating_a_school_spec.rb b/spec/features/school/creating_a_school_spec.rb index 487e4635..b805f11d 100644 --- a/spec/features/school/creating_a_school_spec.rb +++ b/spec/features/school/creating_a_school_spec.rb @@ -50,7 +50,7 @@ it 'responds 422 Unprocessable Entity when params are invalid' do post('/api/schools', headers:, params: { school: { name: ' ' } }) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'responds 401 Unauthorized when no token is given' do diff --git a/spec/features/school/importing_schools_spec.rb b/spec/features/school/importing_schools_spec.rb index 9a3949d2..72dc1163 100644 --- a/spec/features/school/importing_schools_spec.rb +++ b/spec/features/school/importing_schools_spec.rb @@ -53,7 +53,7 @@ it 'responds 422 Unprocessable Entity' do post('/api/schools/import', headers:) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) data = JSON.parse(response.body, symbolize_names: true) expect(data[:error][:error_code]).to eq('CSV_FILE_REQUIRED') end diff --git a/spec/features/school/updating_a_school_spec.rb b/spec/features/school/updating_a_school_spec.rb index 44138822..92f18442 100644 --- a/spec/features/school/updating_a_school_spec.rb +++ b/spec/features/school/updating_a_school_spec.rb @@ -43,7 +43,7 @@ it 'responds 422 Unprocessable Entity when params are invalid' do put("/api/schools/#{school.id}", headers:, params: { school: { name: ' ' } }) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'responds 401 Unauthorized when no token is given' do diff --git a/spec/features/school_class/creating_a_school_class_spec.rb b/spec/features/school_class/creating_a_school_class_spec.rb index b9848b38..05801714 100644 --- a/spec/features/school_class/creating_a_school_class_spec.rb +++ b/spec/features/school_class/creating_a_school_class_spec.rb @@ -78,7 +78,7 @@ it 'responds 422 Unprocessable Entity when params are invalid' do post("/api/schools/#{school.id}/classes", headers:, params: { school_class: { name: ' ' } }) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'responds 401 Unauthorized when no token is given' do diff --git a/spec/features/school_class/importing_a_school_class_spec.rb b/spec/features/school_class/importing_a_school_class_spec.rb index 438997e2..ccb0c0b9 100644 --- a/spec/features/school_class/importing_a_school_class_spec.rb +++ b/spec/features/school_class/importing_a_school_class_spec.rb @@ -40,7 +40,7 @@ post(import_url, headers:, params: params_missing_origin) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) error_response = JSON.parse(response.body) expect(error_response).to have_key('error') expect(error_response['error']).to include("Import origin can't be blank") @@ -52,7 +52,7 @@ post(import_url, headers:, params: params_missing_id) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) error_response = JSON.parse(response.body) expect(error_response).to have_key('error') expect(error_response['error']).to include("Import id can't be blank") @@ -65,7 +65,7 @@ post(import_url, headers:, params: params_missing_both) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) error_response = JSON.parse(response.body) expect(error_response).to have_key('error') expect(error_response['error']).to include("Import origin can't be blank") @@ -77,7 +77,7 @@ post(import_url, headers:, params: params_invalid_enum) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) error_response = JSON.parse(response.body) expect(error_response).to have_key('error') expect(error_response['error']).to include('Import origin is not included in the list') @@ -89,7 +89,7 @@ post(import_url, headers:, params: params_missing_name) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) error_response = JSON.parse(response.body) expect(error_response).to have_key('error') expect(error_response['error']).to include("Name can't be blank") diff --git a/spec/features/school_class/updating_a_school_class_spec.rb b/spec/features/school_class/updating_a_school_class_spec.rb index 21a31fce..f786f0a3 100644 --- a/spec/features/school_class/updating_a_school_class_spec.rb +++ b/spec/features/school_class/updating_a_school_class_spec.rb @@ -53,7 +53,7 @@ it 'responds 422 Unprocessable Entity when params are invalid' do put("/api/schools/#{school.id}/classes/#{school_class.id}", headers:, params: { school_class: { name: ' ' } }) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'responds 401 Unauthorized when no token is given' do diff --git a/spec/features/school_project/complete_spec.rb b/spec/features/school_project/complete_spec.rb index 01220a9e..7e8afa24 100644 --- a/spec/features/school_project/complete_spec.rb +++ b/spec/features/school_project/complete_spec.rb @@ -68,7 +68,7 @@ end it 'completes unauthorized response' do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'completes error message' do diff --git a/spec/features/school_project/return_spec.rb b/spec/features/school_project/return_spec.rb index f530cb86..9904c446 100644 --- a/spec/features/school_project/return_spec.rb +++ b/spec/features/school_project/return_spec.rb @@ -67,7 +67,7 @@ end it 'returns unauthorized response' do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'returns error message' do diff --git a/spec/features/school_project/submit_spec.rb b/spec/features/school_project/submit_spec.rb index deb288e6..56a156a6 100644 --- a/spec/features/school_project/submit_spec.rb +++ b/spec/features/school_project/submit_spec.rb @@ -52,7 +52,7 @@ end it 'returns unauthorized response' do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'returns error message' do diff --git a/spec/features/school_project/unsubmit_spec.rb b/spec/features/school_project/unsubmit_spec.rb index f820a223..9b57b029 100644 --- a/spec/features/school_project/unsubmit_spec.rb +++ b/spec/features/school_project/unsubmit_spec.rb @@ -74,7 +74,7 @@ end it 'returns unauthorized response' do - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'returns error message' do diff --git a/spec/features/school_student/batch_deleting_school_students_spec.rb b/spec/features/school_student/batch_deleting_school_students_spec.rb index b70861a2..c8a6e42f 100644 --- a/spec/features/school_student/batch_deleting_school_students_spec.rb +++ b/spec/features/school_student/batch_deleting_school_students_spec.rb @@ -75,7 +75,7 @@ delete "/api/schools/#{school.id}/students/batch", headers: headers - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) json = JSON.parse(response.body) expect(json['error']).to eq('No student IDs provided') end diff --git a/spec/features/school_student/creating_a_batch_of_school_students_spec.rb b/spec/features/school_student/creating_a_batch_of_school_students_spec.rb index 31c386cd..fc0d0f3c 100644 --- a/spec/features/school_student/creating_a_batch_of_school_students_spec.rb +++ b/spec/features/school_student/creating_a_batch_of_school_students_spec.rb @@ -80,7 +80,7 @@ expect do post("/api/schools/#{school.id}/students/batch", headers:, params:) end.not_to change(GoodJob::BatchRecord, :count) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) active_batches = GoodJob::BatchRecord.where( description: school.id, @@ -126,12 +126,12 @@ it 'responds 422 Unprocessable Entity when params are invalid' do post("/api/schools/#{school.id}/students/batch", headers:, params: { school_students: [] }) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'responds 422 Unprocessable Entity with a suitable message when params are invalid' do post("/api/schools/#{school.id}/students/batch", headers:, params: bad_params) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(response.body).to include('Decryption failed: iv must be 16 bytes') end @@ -139,7 +139,7 @@ stub_profile_api_create_school_students_validation_error stub_profile_api_validate_students_with_validation_error post("/api/schools/#{school.id}/students/batch", headers:, params:) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(response.body).to eq( { error: { diff --git a/spec/features/school_student/creating_a_school_student_spec.rb b/spec/features/school_student/creating_a_school_student_spec.rb index c41a40db..ef046307 100644 --- a/spec/features/school_student/creating_a_school_student_spec.rb +++ b/spec/features/school_student/creating_a_school_student_spec.rb @@ -69,7 +69,7 @@ it 'responds 422 Unprocessable Entity when params are invalid' do post("/api/schools/#{school.id}/students", headers:, params: { school_student: { username: ' ' } }) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'responds 401 Unauthorized when no token is given' do diff --git a/spec/features/school_teacher/inviting_a_school_teacher_spec.rb b/spec/features/school_teacher/inviting_a_school_teacher_spec.rb index 3dcac0df..8f737d07 100644 --- a/spec/features/school_teacher/inviting_a_school_teacher_spec.rb +++ b/spec/features/school_teacher/inviting_a_school_teacher_spec.rb @@ -32,7 +32,7 @@ it 'responds 422 Unprocessable Entity when params are invalid' do post("/api/schools/#{school.id}/teachers", headers:, params: { school_teacher: { email_address: 'invalid' } }) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'responds 401 Unauthorized when no token is given' do diff --git a/spec/features/teacher_invitations/accepting_an_invitation_spec.rb b/spec/features/teacher_invitations/accepting_an_invitation_spec.rb index 9f77b452..38a0bbfe 100644 --- a/spec/features/teacher_invitations/accepting_an_invitation_spec.rb +++ b/spec/features/teacher_invitations/accepting_an_invitation_spec.rb @@ -73,7 +73,7 @@ it 'responds 422 Unprocessable entity' do put("/api/teacher_invitations/#{token}/accept", headers:) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'does not give the user the teacher role for the school to which they have been invited' do @@ -108,7 +108,7 @@ it 'responds 422 Unprocessable entity' do put("/api/teacher_invitations/#{token}/accept", headers:) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'does not give the user the teacher role for the school to which they have been invited' do diff --git a/spec/requests/api_controller_spec.rb b/spec/requests/api_controller_spec.rb index f1ecebbe..ae2f8e96 100644 --- a/spec/requests/api_controller_spec.rb +++ b/spec/requests/api_controller_spec.rb @@ -99,7 +99,7 @@ def index it 'responds with 422 Unprocessable entity status code' do get '/test' - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end it 'responds with JSON including exception class & message' do diff --git a/spec/requests/projects/create_spec.rb b/spec/requests/projects/create_spec.rb index 45e420fb..275c0105 100644 --- a/spec/requests/projects/create_spec.rb +++ b/spec/requests/projects/create_spec.rb @@ -38,7 +38,7 @@ it 'returns error' do post('/api/projects', headers:) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end end end diff --git a/spec/requests/projects/update_spec.rb b/spec/requests/projects/update_spec.rb index c20a48ae..239dbea4 100644 --- a/spec/requests/projects/update_spec.rb +++ b/spec/requests/projects/update_spec.rb @@ -75,7 +75,7 @@ it 'returns error response' do put("/api/projects/#{project.identifier}", params:, headers:) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end end @@ -84,7 +84,7 @@ it 'returns error response' do put("/api/projects/#{project.identifier}", params:, headers:) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end end end @@ -146,7 +146,7 @@ it 'returns unprocessable entity if instructions updated' do params[:project][:instructions] = 'updated instructions' put("/api/projects/#{project.identifier}", params:, headers:) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) end end