Add CRUD Milestone on Admin::BudgetInvestment. Rename Checkpoint to Milestone.
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
require 'rails_helper'
|
||||
|
||||
describe "Budget::Investment::Checkpoint" do
|
||||
|
||||
describe "Validations" do
|
||||
let(:checkpoint) { build(:budget_investment_checkpoint) }
|
||||
|
||||
it "should be valid" do
|
||||
expect(checkpoint).to be_valid
|
||||
end
|
||||
|
||||
it "should not be valid without a title" do
|
||||
checkpoint.title = nil
|
||||
expect(checkpoint).to_not be_valid
|
||||
end
|
||||
|
||||
it "should not be valid without an investment" do
|
||||
checkpoint.investment_id = nil
|
||||
expect(checkpoint).to_not be_valid
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
23
spec/models/budget/investment/milestone_spec.rb
Normal file
23
spec/models/budget/investment/milestone_spec.rb
Normal file
@@ -0,0 +1,23 @@
|
||||
require 'rails_helper'
|
||||
|
||||
describe "Budget::Investment::Milestone" do
|
||||
|
||||
describe "Validations" do
|
||||
let(:milestone) { build(:budget_investment_milestone) }
|
||||
|
||||
it "should be valid" do
|
||||
expect(milestone).to be_valid
|
||||
end
|
||||
|
||||
it "should not be valid without a title" do
|
||||
milestone.title = nil
|
||||
expect(milestone).to_not be_valid
|
||||
end
|
||||
|
||||
it "should not be valid without an investment" do
|
||||
milestone.investment_id = nil
|
||||
expect(milestone).to_not be_valid
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user