Sha256: 0ecf153356df473d7a955a5572585c71086473ea4ef43d8d27e69e837d4e4848
Contents?: true
Size: 938 Bytes
Versions: 1
Compression:
Stored size: 938 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe Lolita::RestController do render_views before(:each) do @controller.request.env["lolita.mapping"]=Lolita.mappings[:post] end it "should create new nested resources together with base resource" # do # p = {:title=>"Post 1"} # p[:comments_attributes] = [{:body=>"Comment 1"}, {:body=>"Comment 2"}] # post :create, :post=>p # Post.last.title.should == "Post 1" # puts Comment.all.to_a.inspect # Post.first.comments.length.should == 2 # Post.first.comments.last.body.should == "Comment 2" # end it "should create new nested resources for existing base resource" it "should add new nested resources for existing base resource with existing nested resourcer" it "should remove nested resources from base resource" it "should modify nested resources for given base resource" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lolita-3.1.10 | spec/controllers/lolita_rest_nested_resources_spec.rb |