wedding-planner/spec/models/expense_spec.rb
Manuel Bustillo 86b9d0b56c
All checks were successful
Check usage of free licenses / check-licenses (pull_request) Successful in 1m5s
Add copyright notice / copyright_notice (pull_request) Successful in 1m49s
Run unit tests / unit_tests (pull_request) Successful in 8m24s
Document expenses endpoint and add some specs
2024-11-16 10:22:10 +01:00

13 lines
359 B
Ruby

# Copyright (C) 2024 Manuel Bustillo
require 'rails_helper'
RSpec.describe Expense, type: :model do
describe 'validations' do
it { should validate_presence_of(:name) }
it { should validate_presence_of(:amount) }
it { should validate_numericality_of(:amount).is_greater_than(0) }
it { should validate_presence_of(:pricing_type) }
end
end