Added a spec for saving a casted array
This commit is contained in:
parent
fc18b47800
commit
e94403ca28
|
@ -209,6 +209,10 @@ describe CouchRest::CastedModel do
|
||||||
toy = CatToy.new :name => "Mouse"
|
toy = CatToy.new :name => "Mouse"
|
||||||
@cat.toys.push(toy)
|
@cat.toys.push(toy)
|
||||||
@cat.save.should be_true
|
@cat.save.should be_true
|
||||||
|
@cat = Cat.get @cat.id
|
||||||
|
@cat.toys.class.should == CastedArray
|
||||||
|
@cat.toys.first.class.should == CatToy
|
||||||
|
@cat.toys.first.should === toy
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should fail because name is not present" do
|
it "should fail because name is not present" do
|
||||||
|
|
Loading…
Reference in a new issue