Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Makes article controller specs pass

For some reasons, the newly created article was never loaded because a Factory created article created in the future in another test was loaded first.
  • Loading branch information...
commit 3139b2d757c8967b051f413d962e40e0a4052ca2 1 parent 75c4073
@fdv fdv authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 spec/controllers/admin/content_controller_spec.rb
View
6 spec/controllers/admin/content_controller_spec.rb
@@ -1,4 +1,4 @@
-require 'spec_helper'
+ require 'spec_helper'
describe Admin::ContentController do
render_views
@@ -336,11 +336,11 @@ def base_article(options={})
end
it 'should create a filtered article' do
+ Article.delete_all
body = "body via *markdown*"
extended="*foo*"
post :new, 'article' => { :title => "another test", :body => body, :extended => extended}
- assert_response :redirect, :action => 'show'
-
+ assert_response :redirect, :action => 'index'
new_article = Article.find(:first, :order => "created_at DESC")
assert_equal body, new_article.body
assert_equal extended, new_article.extended
Please sign in to comment.
Something went wrong with that request. Please try again.