First fix in the model specs, more to be done, mostly event mocking it seems

This commit is contained in:
2025-09-23 17:55:19 -05:00
parent 7dadb28004
commit 57adfdbfbf
2 changed files with 15 additions and 8 deletions
+3 -1
View File
@@ -1,8 +1,9 @@
require 'spec_helper'
describe :section do
let(:supplier) { create :supplier }
before :each do
@section = build :section, path: [[10, 30], [20,30], [20,40], [10, 40]]
@section = build :section, supplier: supplier, path: [[10, 30], [20,30], [20,40], [10, 40]]
end
it "creates without problem" do
@@ -23,6 +24,7 @@ describe :section do
it "should persist width property through database" do
@section.width = 3.2
@section.save
@reloaded_section = Section.find(@section.id)
@reloaded_section.width.should == 3.2
end