wedding-planner/spec/requests/passwords_spec.rb
Manuel Bustillo b215e8a3b4
All checks were successful
Check usage of free licenses / check-licenses (pull_request) Successful in 1m29s
Add copyright notice / copyright_notice (pull_request) Successful in 2m14s
Run unit tests / unit_tests (pull_request) Successful in 3m12s
Add copyright notice
2024-11-19 07:57:42 +00:00

43 lines
1.0 KiB
Ruby

# Copyright (C) 2024 Manuel Bustillo
require 'swagger_helper'
RSpec.describe 'passwords', type: :request do
path '/passwords' do
post('send a password (re)set email') do
tags 'Passwords'
consumes 'application/json'
produces 'application/json'
parameter name: :body, in: :body, schema: {
type: :object,
required: [:email_address],
properties: {
email_address: { type: :string, format: :email }
}
}
response_empty_201
end
end
path '/passwords/{token}' do
parameter name: 'token', in: :path, type: :string, description: 'token'
put('update password') do
tags 'Passwords'
consumes 'application/json'
produces 'application/json'
parameter name: :body, in: :body, schema: {
type: :object,
required: %i[password password_confirmation],
properties: {
password: { type: :string },
password_confirmation: { type: :string }
}
}
response_empty_200
response_422
end
end
end