|
|
@ -912,7 +912,7 @@ RSpec.describe UsersController, type: :request do |
|
|
|
"user": { |
|
|
|
"user": { |
|
|
|
name: "", |
|
|
|
name: "", |
|
|
|
email: "", |
|
|
|
email: "", |
|
|
|
role: "support", |
|
|
|
role: "", |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
end |
|
|
|
end |
|
|
@ -920,7 +920,9 @@ RSpec.describe UsersController, type: :request do |
|
|
|
it "shows an error" do |
|
|
|
it "shows an error" do |
|
|
|
request |
|
|
|
request |
|
|
|
expect(response).to have_http_status(:unprocessable_entity) |
|
|
|
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 |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|