updated to rails 3.2, fixed tests

This commit is contained in:
albert
2012-01-27 14:22:47 -05:00
parent 75d977ae80
commit c8bcf5ad7c
16 changed files with 146 additions and 105 deletions

View File

@@ -117,12 +117,14 @@ class ArtistTest < ActiveSupport::TestCase
should "have an associated wiki" do
user = Factory.create(:user)
CurrentUser.user = user
artist = Factory.create(:artist, :name => "max", :wiki_page_attributes => {:title => "xxx", :body => "this is max"})
assert_not_nil(artist.wiki_page)
assert_equal("this is max", artist.wiki_page.body)
artist.update_attributes(:wiki_page_attributes => {:id => artist.wiki_page.id, :body => "this is hoge mark ii", :creator_id => user.id})
artist.update_attributes({:wiki_page_attributes => {:id => artist.wiki_page.id, :body => "this is hoge mark ii"}})
assert_equal("this is hoge mark ii", artist.wiki_page(true).body)
CurrentUser.user = nil
end
should "revert to prior versions" do