hackatime/test/controllers/docs_controller_test.rb
Mahad Kalam 44777ad644
Data export fix + async exports + more tests (#989)
* Fix data export + Capybara

* Continue?

* A ton of system tests :D + test cleanup

* More system tests

* Add placeholder keys for tests?

* Get rid of the double-query!

* Speed up CI Chrome setup by avoiding snap installs

* Pin CI Chrome version to reduce system test flakiness

* Stabilize integrations settings system test interaction
2026-02-21 11:28:21 +00:00

22 lines
658 B
Ruby

require "test_helper"
class DocsControllerTest < ActionDispatch::IntegrationTest
# -- docs show .md format --
test "docs show returns markdown content when requested with .md format" do
get "/docs/getting-started/quick-start.md"
assert_response :success
assert_match %r{text/markdown}, response.content_type
expected_content = File.read(Rails.root.join("docs", "getting-started", "quick-start.md"))
assert_equal expected_content, response.body
end
test "docs show returns HTML/Inertia by default" do
get "/docs/getting-started/quick-start"
assert_response :success
assert_inertia_component "Docs/Show"
end
end