wedding-planner/spec/models/expense_spec.rb

17 lines
446 B
Ruby
Raw Normal View History

2024-12-28 16:31:27 +00:00
# Copyright (C) 2024 Manuel Bustillo
2024-10-28 22:07:35 +00:00
# Copyright (C) 2024 Manuel Bustillo
# frozen_string_literal: true
2024-07-11 19:55:48 +02:00
require 'rails_helper'
2024-12-28 17:27:28 +01:00
RSpec.describe Expense do
describe 'validations' do
2024-12-28 17:27:28 +01:00
it { is_expected.to validate_presence_of(:name) }
it { is_expected.to validate_presence_of(:amount) }
it { is_expected.to validate_numericality_of(:amount).is_greater_than(0) }
it { is_expected.to validate_presence_of(:pricing_type) }
end
2024-07-11 19:55:48 +02:00
end