You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- 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(json["code"]).to be_present
- expect(json["user"]["role"]).to eq("guest")
- end
- end
-
- describe "POST /users/code/renew" do
- it "should be 401 when not logged in (recommended behavior)" do
- sign_out
- post "/users/code/renew"
- expect(response).to have_http_status(:unauthorized)
- end
- end
- end
|