Browse Source

more tests

pull/787/head
JG 3 years ago
parent
commit
fcc8dea4d2
  1. 6
      spec/requests/users_controller_spec.rb

6
spec/requests/users_controller_spec.rb

@ -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

Loading…
Cancel
Save