From ed4c61e3cce2e9c20d71c47500932202b7dfb746 Mon Sep 17 00:00:00 2001 From: Morgan Aubert Date: Sat, 13 Jul 2024 18:56:56 -0300 Subject: [PATCH] Ensure project uses Marten 0.5 --- shard.lock | 2 +- spec/apps/auth/handlers/sign_in_handler_spec.cr | 6 +++--- spec/apps/auth/handlers/sign_up_handler_spec.cr | 2 +- spec/apps/profiles/handlers/settings_update_handler_spec.cr | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/shard.lock b/shard.lock index 337e50b..24b246d 100644 --- a/shard.lock +++ b/shard.lock @@ -18,7 +18,7 @@ shards: marten: git: https://github.com/martenframework/marten.git - version: 0.4.5 + version: 0.5.0 marten_auth: git: https://github.com/martenframework/marten-auth.git diff --git a/spec/apps/auth/handlers/sign_in_handler_spec.cr b/spec/apps/auth/handlers/sign_in_handler_spec.cr index bb3d8a7..6c3d77a 100644 --- a/spec/apps/auth/handlers/sign_in_handler_spec.cr +++ b/spec/apps/auth/handlers/sign_in_handler_spec.cr @@ -28,7 +28,7 @@ describe Auth::SignInHandler do url = Marten.routes.reverse("auth:sign_in") response = Marten::Spec.client.post(url, data: {"email": "", "password": ""}) - response.status.should eq 200 + response.status.should eq 422 response.content.includes?("Sign in").should be_true end @@ -38,7 +38,7 @@ describe Auth::SignInHandler do url = Marten.routes.reverse("auth:sign_in") response = Marten::Spec.client.post(url, data: {"email": user.email, "password": "bad"}) - response.status.should eq 200 + response.status.should eq 422 response.content.includes?("Sign in").should be_true response.content.includes?( "Please enter a correct email address and password. Note that both fields may be case-sensitive." @@ -51,7 +51,7 @@ describe Auth::SignInHandler do url = Marten.routes.reverse("auth:sign_in") response = Marten::Spec.client.post(url, data: {"email": user.email, "password": "bad"}) - response.status.should eq 200 + response.status.should eq 422 response.content.includes?("Sign in").should be_true response.content.includes?( "Please enter a correct email address and password. Note that both fields may be case-sensitive." diff --git a/spec/apps/auth/handlers/sign_up_handler_spec.cr b/spec/apps/auth/handlers/sign_up_handler_spec.cr index 0bc20d4..f23a7bc 100644 --- a/spec/apps/auth/handlers/sign_up_handler_spec.cr +++ b/spec/apps/auth/handlers/sign_up_handler_spec.cr @@ -28,7 +28,7 @@ describe Auth::SignUpHandler do url = Marten.routes.reverse("auth:sign_up") response = Marten::Spec.client.post(url, data: {"username": "", "email": "", "password": ""}) - response.status.should eq 200 + response.status.should eq 422 response.content.includes?("Sign up").should be_true end diff --git a/spec/apps/profiles/handlers/settings_update_handler_spec.cr b/spec/apps/profiles/handlers/settings_update_handler_spec.cr index 2f89e80..97948e3 100644 --- a/spec/apps/profiles/handlers/settings_update_handler_spec.cr +++ b/spec/apps/profiles/handlers/settings_update_handler_spec.cr @@ -39,7 +39,7 @@ describe Profiles::SettingsUpdateHandler do url = Marten.routes.reverse("profiles:settings_update") response = Marten::Spec.client.post(url, data: {"email" => ""}) - response.status.should eq 200 + response.status.should eq 422 response.content.includes?("Your Settings").should be_true end