Added some Content-Type unit tests
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user