fixing instance loading with :singleton option - closes #310

This commit is contained in:
Ryan Bates
2011-03-18 09:42:30 -07:00
parent 3efa069349
commit 7688025404
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -258,8 +258,8 @@ describe CanCan::ControllerResource do
@controller.instance_variable_get(:@project).should == :some_project
end
it "should find record through has_one association with :singleton option" do
@params.merge!(:action => "show", :id => 123)
it "should find record through has_one association with :singleton option without id param" do
@params.merge!(:action => "show", :id => nil)
category = Object.new
@controller.instance_variable_set(:@category, category)
stub(category).project { :some_project }