Use Minitest::Test
`Test::Unit` is deprecated, and we can switch to `Minitest::Test` with almost no side effects. This commit does all of the work required to make Minitest tests run with Gollum's existing test helpers.
This commit is contained in:
+12
-12
@@ -51,11 +51,11 @@ context "Precious::Views::Editing" do
|
||||
|
||||
get '/gollum/history/A'
|
||||
|
||||
assert_no_match /Edit/, last_response.body, "'Edit' link is not blocked in history template"
|
||||
refute_match /Edit/, last_response.body, "'Edit' link is not blocked in history template"
|
||||
|
||||
get '/gollum/compare/A/fc66539528eb96f21b2bbdbf557788fe8a1196ac..b26b791cb7917c4f37dd9cb4d1e0efb24ac4d26f'
|
||||
|
||||
assert_no_match /Edit Page/, last_response.body, "'Edit Page' link is not blocked in compare template"
|
||||
refute_match /Edit Page/, last_response.body, "'Edit Page' link is not blocked in compare template"
|
||||
assert_match /Revert Changes/, last_response.body, "'Revert Changes' link is blocked in compare template"
|
||||
end
|
||||
|
||||
@@ -63,27 +63,27 @@ context "Precious::Views::Editing" do
|
||||
Precious::App.set(:wiki_options, { allow_editing: false })
|
||||
get '/A'
|
||||
|
||||
assert_no_match /Delete this Page/, last_response.body, "'Delete this Page' link not blocked in page template"
|
||||
assert_no_match /New/, last_response.body, "'New' button not blocked in page template"
|
||||
assert_no_match /Upload\b/, last_response.body, "'Upload' link not blocked in page template"
|
||||
assert_no_match /Rename/, last_response.body, "'Rename' link not blocked in page template"
|
||||
assert_no_match /Edit/, last_response.body, "'Edit' link not blocked in page template"
|
||||
refute_match /Delete this Page/, last_response.body, "'Delete this Page' link not blocked in page template"
|
||||
refute_match /New/, last_response.body, "'New' button not blocked in page template"
|
||||
refute_match /Upload\b/, last_response.body, "'Upload' link not blocked in page template"
|
||||
refute_match /Rename/, last_response.body, "'Rename' link not blocked in page template"
|
||||
refute_match /Edit/, last_response.body, "'Edit' link not blocked in page template"
|
||||
|
||||
get '/gollum/overview'
|
||||
|
||||
assert_no_match /New/, last_response.body, "'New' link not blocked in pages template"
|
||||
refute_match /New/, last_response.body, "'New' link not blocked in pages template"
|
||||
|
||||
get '/gollum/history/A'
|
||||
|
||||
assert_no_match /Edit/, last_response.body, "'Edit' link not blocked in history template"
|
||||
refute_match /Edit/, last_response.body, "'Edit' link not blocked in history template"
|
||||
|
||||
get '/gollum/compare/A/fc66539528eb96f21b2bbdbf557788fe8a1196ac..b26b791cb7917c4f37dd9cb4d1e0efb24ac4d26f'
|
||||
|
||||
assert_no_match /Edit Page/, last_response.body, "'Edit Page' link not blocked in compare template"
|
||||
assert_no_match /Revert Changes/, last_response.body, "'Revert Changes' link not blocked in compare template"
|
||||
refute_match /Edit Page/, last_response.body, "'Edit Page' link not blocked in compare template"
|
||||
refute_match /Revert Changes/, last_response.body, "'Revert Changes' link not blocked in compare template"
|
||||
end
|
||||
|
||||
def app
|
||||
Precious::App
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user