Generalize the BudgetInvestmentStatus model to Milestone::Status so it is not specific to budget investments, but can be used for any entity which has milestones. This is in preparation to make the Milestone model polymorphic and usable by entities other than budget investments.
18 lines
312 B
Ruby
18 lines
312 B
Ruby
require 'rails_helper'
|
|
|
|
describe Milestone::Status do
|
|
|
|
describe "Validations" do
|
|
let(:status) { build(:milestone_status) }
|
|
|
|
it "is valid" do
|
|
expect(status).to be_valid
|
|
end
|
|
|
|
it "is not valid without a name" do
|
|
status.name = nil
|
|
expect(status).not_to be_valid
|
|
end
|
|
end
|
|
end
|