tests: fix forum post votes & wiki page updater tests.

* Move forum post vote tests from test/controllers to test/functional.
* Fix forum post vote tests to work with new routes.
* Fix obsolete wiki page tests dealing with updater_id.
This commit is contained in:
evazion
2019-10-28 02:13:10 -05:00
parent dfbf4f3f0a
commit 754e3a2ee2
5 changed files with 29 additions and 71 deletions

View File

@@ -101,16 +101,6 @@ class WikiPageTest < ActiveSupport::TestCase
assert_equal("hot_potato", @wiki_page.title)
end
should "differentiate between updater and creator" do
another_user = FactoryBot.create(:user)
CurrentUser.scoped(another_user, "127.0.0.1") do
@wiki_page.title = "yyy"
@wiki_page.save
end
version = WikiPageVersion.last
assert_not_equal(@wiki_page.creator_id, version.updater_id)
end
should "update its dtext links" do
@wiki_page.update!(body: "[[long hair]]")
assert_equal(1, @wiki_page.dtext_links.size)