ユーザ作成時に IP アドレス連携するやぅに (#323) (#326)

Merge branch 'main' into feature/323

Merge branch 'main' into feature/323

Merge branch 'main' into feature/323

#323

#323

Co-authored-by: miteruzo <miteruzo@naver.com>
Reviewed-on: #326
This commit was merged in pull request #326.
This commit is contained in:
2026-04-25 21:00:22 +09:00
parent c112576b11
commit b2c3e02ccc
2 changed files with 26 additions and 10 deletions
+2 -3
View File
@@ -1,11 +1,10 @@
require "rails_helper"
RSpec.describe "Users", type: :request do
describe "POST /users" do
it "creates guest user and returns code" do
post "/users"
expect(response).to have_http_status(:ok)
expect(response).to have_http_status(:created)
expect(json["code"]).to be_present
expect(json["user"]["role"]).to eq("guest")
end
@@ -38,7 +37,7 @@ RSpec.describe "Users", type: :request do
sign_in_as(user)
put "/users/#{user.id}", params: { name: "new-name" }
expect(response).to have_http_status(:created)
expect(response).to have_http_status(:ok)
expect(json["id"]).to eq(user.id)
expect(json["name"]).to eq("new-name")