All checks were successful
		
		
	
	Check usage of free licenses / check-licenses (pull_request) Successful in 1m38s
				
			Add copyright notice / copyright_notice (pull_request) Successful in 3m16s
				
			Run unit tests / unit_tests (pull_request) Successful in 5m31s
				
			Build Nginx-based docker image / build-static-assets (pull_request) Successful in 41m31s
				
			
		
			
				
	
	
		
			64 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			64 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Ruby
		
	
	
	
	
	
# Copyright (C) 2024-2025 LibreWeddingPlanner contributors
 | 
						|
 | 
						|
# frozen_string_literal: true
 | 
						|
 | 
						|
require 'swagger_helper'
 | 
						|
 | 
						|
RSpec.describe 'summary' do
 | 
						|
  path '/{slug}/summary' do
 | 
						|
    get('list summaries') do
 | 
						|
      tags 'Summary'
 | 
						|
      produces 'application/json'
 | 
						|
      consumes 'application/json'
 | 
						|
      parameter Swagger::Schema::SLUG
 | 
						|
      response(200, 'successful') do
 | 
						|
        schema type: :object,
 | 
						|
               required: %i[expenses guests],
 | 
						|
               properties: {
 | 
						|
                 expenses: {
 | 
						|
                   type: :object,
 | 
						|
                   required: %i[projected confirmed status],
 | 
						|
                   properties: {
 | 
						|
                     projected: {
 | 
						|
                       type: :object,
 | 
						|
                       required: %i[total guests],
 | 
						|
                       properties: {
 | 
						|
                         total: { type: :number },
 | 
						|
                         guests: { type: :number }
 | 
						|
                       }
 | 
						|
                     },
 | 
						|
                     confirmed: {
 | 
						|
                       type: :object,
 | 
						|
                       required: %i[total guests],
 | 
						|
                       properties: {
 | 
						|
                         total: { type: :number },
 | 
						|
                         guests: { type: :number }
 | 
						|
                       }
 | 
						|
                     },
 | 
						|
                     status: {
 | 
						|
                       type: :object,
 | 
						|
                       required: [:paid],
 | 
						|
                       properties: {
 | 
						|
                         paid: { type: :number }
 | 
						|
                       }
 | 
						|
                     }
 | 
						|
                   }
 | 
						|
                 },
 | 
						|
                 guests: {
 | 
						|
                   type: :object,
 | 
						|
                   required: %i[total confirmed declined tentative invited],
 | 
						|
                   properties: {
 | 
						|
                     total: { type: :number },
 | 
						|
                     confirmed: { type: :number },
 | 
						|
                     declined: { type: :number },
 | 
						|
                     tentative: { type: :number },
 | 
						|
                     invited: { type: :number }
 | 
						|
                   }
 | 
						|
                 }
 | 
						|
               }
 | 
						|
        xit
 | 
						|
      end
 | 
						|
    end
 | 
						|
  end
 | 
						|
end
 |