Created
May 3, 2009 03:03
-
-
Save tomtt/105805 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | |
| describe CommentsController do | |
| describe "create" do | |
| describe "with valid parameters" do | |
| it "should redirect to the enclosing resource page after successful submit when nested in aliased url" do | |
| news_article = Factory.create(:news_article) | |
| post(:create, | |
| :comment => {}, | |
| :news_article_id => news_article.to_param) | |
| response.should redirect_to(news_article_path(news_article, { 'comment[body]' => '' })) | |
| end | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment