wedding-planner/spec/requests/users/registrations_spec.rb

41 lines
1.0 KiB
Ruby
Raw Permalink Normal View History

2025-01-13 20:38:47 +00:00
# Copyright (C) 2024 Manuel Bustillo
# Copyright (C) 2024-2025 LibreWeddingPlanner contributors
2024-11-30 13:27:21 +00:00
# frozen_string_literal: true
require 'swagger_helper'
2024-12-28 18:07:22 +01:00
RSpec.describe 'users/registrations' do
path '/{slug}/users' do
post('create registration') do
tags 'Users Registrations'
consumes 'application/json'
produces 'application/json'
2024-12-28 18:07:22 +01:00
parameter Swagger::Schema::SLUG
parameter name: :body, in: :body, schema: {
type: :object,
2024-12-28 18:07:22 +01:00
required: %i[user wedding],
properties: {
user: {
type: :object,
required: %i[email password password_confirmation],
properties: {
2024-12-28 18:07:22 +01:00
email: { type: :string, format: :email },
password: SwaggerResponseHelper::PASSWORD,
password_confirmation: SwaggerResponseHelper::PASSWORD
}
},
**Swagger::Schema::CAPTCHA
}
}
response(201, 'created') do
schema type: :object, properties: Swagger::Schema::USER
xit
end
end
end
end