Sha256: adf1ede747ec41706801c6b73e97d4d9ee39473e2066c3ab7bc709aeec97dd6f
Contents?: true
Size: 870 Bytes
Versions: 27
Compression:
Stored size: 870 Bytes
Contents
# frozen_string_literal: true require "spec_helper" describe Decidim::Budgets::LineItem do let(:line_item) { build :line_item } subject { line_item } describe "validations" do it "is valid" do expect(subject).to be_valid end it "is invalid when order is not present" do subject.order = nil expect(subject).to be_invalid end it "is invalid when project is not present" do subject.project = nil expect(subject).to be_invalid end it "is invalid when the same litem item exists" do subject.save new_line_item = build :line_item, order: subject.order, project: subject.project expect(new_line_item).to be_invalid end it "is invalid when order and project are from a different feature" do subject.order = build(:order) expect(subject).to be_invalid end end end
Version data entries
27 entries across 27 versions & 1 rubygems