wedding-planner/spec/requests/passwords_spec.rb
Manuel Bustillo 87ec883cd8 Revert "Add copyright notice"
This reverts commit b215e8a3b40be089e7359cfd424f807c2d54b1c2.
2024-11-30 10:44:15 +01:00

41 lines
1.0 KiB
Ruby

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