fix tests, better error handling in pixiv ugoira converter

This commit is contained in:
Albert Yi
2016-10-25 16:20:47 -07:00
parent 79842f7a3b
commit 24d44dd4f8
3 changed files with 14 additions and 4 deletions

View File

@@ -27,7 +27,7 @@ class TagAliasCorrectionTest < ActiveSupport::TestCase
should "have the correct statistics hash" do
assert_equal("zzz", @correction.statistics_hash["antecedent_cache"])
assert_equal("bbb", @correction.statistics_hash["consequent_cache"])
assert_equal(nil, @correction.statistics_hash["consequent_cache"])
assert_equal(-3, @correction.statistics_hash["antecedent_count"])
assert_equal(1, @correction.statistics_hash["consequent_count"])
end

View File

@@ -53,7 +53,7 @@ class WikiPageTest < ActiveSupport::TestCase
should "not allow the is_locked attribute to be updated" do
@wiki_page.update_attributes(:is_locked => true)
assert_equal(["Is locked can be modified by moderators only", "Is locked and cannot be updated"], @wiki_page.errors.full_messages)
assert_equal(["Is locked can be modified by builders only", "Is locked and cannot be updated"], @wiki_page.errors.full_messages)
@wiki_page.reload
assert_equal(false, @wiki_page.is_locked?)
end