From fcc8dea4d28b07804bb90d73ca195df9329dd1a8 Mon Sep 17 00:00:00 2001 From: JG Date: Fri, 29 Jul 2022 12:24:55 +0100 Subject: [PATCH] more tests --- spec/requests/users_controller_spec.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spec/requests/users_controller_spec.rb b/spec/requests/users_controller_spec.rb index 8b2a7be68..a99d1e6c3 100644 --- a/spec/requests/users_controller_spec.rb +++ b/spec/requests/users_controller_spec.rb @@ -912,7 +912,7 @@ RSpec.describe UsersController, type: :request do "user": { name: "", email: "", - role: "support", + role: "", }, } end @@ -920,7 +920,9 @@ RSpec.describe UsersController, type: :request do it "shows an error" do request expect(response).to have_http_status(:unprocessable_entity) - expect(page).to have_content(I18n.t("validations.role.invalid")) + expect(page).to have_content(I18n.t("activerecord.errors.models.user.attributes.name.blank")) + expect(page).to have_content(I18n.t("activerecord.errors.models.user.attributes.email.blank")) + expect(page).to have_content(I18n.t("activerecord.errors.models.user.attributes.role.blank")) end end end