refactor how artist notes are updated

This commit is contained in:
r888888888
2017-04-18 15:57:20 -07:00
parent e639be60e5
commit 68f057e7ba
4 changed files with 104 additions and 82 deletions

View File

@@ -310,18 +310,6 @@ class ArtistTest < ActiveSupport::TestCase
assert_not_nil(Artist.search(:name => "group:cat_or_fish").first)
end
should "have an associated wiki" do
user = FactoryGirl.create(:user)
CurrentUser.user = user
artist = FactoryGirl.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"}})
assert_equal("this is hoge mark ii", artist.wiki_page(true).body)
CurrentUser.user = nil
end
should "revert to prior versions" do
user = FactoryGirl.create(:user)
reverter = FactoryGirl.create(:user)