2024-10-28 22:07:35 +00:00
|
|
|
# Copyright (C) 2024 Manuel Bustillo
|
|
|
|
|
2024-07-11 19:55:48 +02:00
|
|
|
require 'rails_helper'
|
|
|
|
|
|
|
|
RSpec.describe Expense, type: :model do
|
2024-11-16 10:22:10 +01:00
|
|
|
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
|
2024-07-11 19:55:48 +02:00
|
|
|
end
|