implement postarchive

This commit is contained in:
Albert Yi
2017-01-13 17:21:05 -08:00
committed by r888888888
parent 6c9d5e4f9a
commit 5404c1d231
17 changed files with 378 additions and 98 deletions

View File

@@ -107,11 +107,14 @@ class NoteTest < ActiveSupport::TestCase
setup do
@post = FactoryGirl.create(:post, :image_width => 1000, :image_height => 1000)
@note = FactoryGirl.create(:note, :post => @post)
@note.stubs(:merge_version?).returns(false)
end
should "increment the updater's note_update_count" do
assert_difference("CurrentUser.note_update_count", 1) do
@user.reload
assert_difference("@user.note_update_count", 1) do
@note.update_attributes(:body => "zzz")
@user.reload
end
end