wedding-planner/spec/requests/users/registrations_spec.rb
Manuel Bustillo 5f01741943
Some checks failed
Check usage of free licenses / check-licenses (pull_request) Failing after 51s
Add copyright notice / copyright_notice (pull_request) Successful in 1m0s
Run unit tests / unit_tests (pull_request) Successful in 1m40s
Validate the Captcha challenge for account signup
2024-12-01 19:57:01 +01:00

45 lines
1.2 KiB
Ruby

# Copyright (C) 2024 Manuel Bustillo
require 'swagger_helper'
RSpec.describe 'users/registrations', type: :request do
path '/{slug}/users' do
post('create registration') do
tags 'Users Registrations'
consumes 'application/json'
produces 'application/json'
parameter Swagger::Schema::SLUG
parameter name: :body, in: :body, schema: {
type: :object,
required: [:user, :wedding],
properties: {
user: {
type: :object,
required: %i[email password password_confirmation],
properties: {
email: { type: :string, format: :email},
password: SwaggerResponseHelper::PASSWORD,
password_confirmation: SwaggerResponseHelper::PASSWORD
}
},
wedding: {
type: :object,
required: %i[date],
properties: {
date: { type: :string, format: :date},
}
},
**Swagger::Schema::CAPTCHA
}
}
response(201, 'created') do
schema type: :object, properties: Swagger::Schema::USER
xit
end
end
end
end