First fix in the model specs, more to be done, mostly event mocking it seems
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user