Skip to content

Commit

Permalink
Specs for destroy_resource not returning the correct object
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwhite committed Feb 10, 2010
1 parent 93b8ced commit 143b4e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/controllers/resource_service_in_infos_controller_spec.rb
Expand Up @@ -29,4 +29,8 @@
lambda { @resource_service.destroy }.should change(Info, :count).by(-1)
lambda { Info.find(@info.id) }.should raise_error(ActiveRecord::RecordNotFound)
end

it "should return the destroyed info with destroy" do
@resource_service.destroy.should == @info
end
end
Expand Up @@ -44,4 +44,8 @@
lambda { @resource_service.destroy(@other_interest.id) }.should raise_error
Interest.find(@other_interest.id).should == @other_interest
end

it "should return the destroyed interest with destroy(@interest.id)" do
@resource_service.destroy(@interest.id).should == @interest
end
end

0 comments on commit 143b4e0

Please sign in to comment.