Added some Content-Type unit tests
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2025-08-19 19:15:37 -04:00
parent 98717db3d5
commit 8b2c152803
5 changed files with 45 additions and 1 deletions

View File

@@ -11,6 +11,10 @@ RSpec.describe(TestController) do
expect(last_response).to(be_redirect)
end
it 'Test base route is an HTML response' do
expect(last_response['Content-Type']).to(include('text/html'))
end
it 'Test base route Location header points to /test/list' do
expect(last_response['Location']).to(eq("#{BASE_URL}/test/list"))
end
@@ -24,6 +28,10 @@ RSpec.describe(TestController) do
expect(last_response).to(be_ok)
end
it 'Test list page is an HTML response' do
expect(last_response['Content-Type']).to(include('text/html'))
end
it "Test list page contains 'List of tests' on page." do
expect(last_response.body).to(include('List of tests'))
end
@@ -37,6 +45,10 @@ RSpec.describe(TestController) do
expect(last_response).to(be_ok)
end
it 'Test add page is an HTML response' do
expect(last_response['Content-Type']).to(include('text/html'))
end
it "Test add page contains 'Add new test' on page." do
expect(last_response.body).to(include('Add new test'))
end