Adds simple Budget specs
This commit is contained in:
15
spec/models/budget_spec.rb
Normal file
15
spec/models/budget_spec.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
require 'rails_helper'
|
||||
|
||||
describe Budget do
|
||||
it "validates the phase" do
|
||||
budget = create(:budget)
|
||||
Budget::VALID_PHASES.each do |phase|
|
||||
budget.phase = phase
|
||||
expect(budget).to be_valid
|
||||
end
|
||||
|
||||
budget.phase = 'inexisting'
|
||||
expect(budget).to_not be_valid
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user