Created
October 17, 2012 17:22
-
-
Save enricostano/3906849 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe "DELETE #destroy" do | |
before(:each) do | |
@institution = mock_model(Institution) | |
should_authorize(:destroy, @institution) | |
Institution.should_receive(:find).with("1").and_return(@institution) | |
@institution.should_receive(:destroy).and_return(true) | |
get :destroy, id: "1" | |
end | |
it "assigns the requested institution to @institution" do | |
assigns(:institution).should eq(@institution) | |
end | |
it "redirect to :index action" do | |
response.should redirect_to(institutions_url) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment