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(BenchmarkController) do
|
||||
expect(last_response).to(be_redirect)
|
||||
end
|
||||
|
||||
it 'Benchmark base route is an HTML response' do
|
||||
expect(last_response['Content-Type']).to(include('text/html'))
|
||||
end
|
||||
|
||||
it 'Benchmark base route Location header points to /benchmark/list' do
|
||||
expect(last_response['Location']).to(eq("#{BASE_URL}/benchmark/list"))
|
||||
end
|
||||
@@ -24,6 +28,10 @@ RSpec.describe(BenchmarkController) do
|
||||
expect(last_response).to(be_ok)
|
||||
end
|
||||
|
||||
it 'Benchmark list page is an HTML response' do
|
||||
expect(last_response['Content-Type']).to(include('text/html'))
|
||||
end
|
||||
|
||||
it "Benchmark list page contains 'List of benchmarks' on page." do
|
||||
expect(last_response.body).to(include('List of benchmarks'))
|
||||
end
|
||||
@@ -37,6 +45,10 @@ RSpec.describe(BenchmarkController) do
|
||||
expect(last_response).to(be_ok)
|
||||
end
|
||||
|
||||
it 'Benchmark add page is an HTML response' do
|
||||
expect(last_response['Content-Type']).to(include('text/html'))
|
||||
end
|
||||
|
||||
it "Benchmark add page contains 'Add new benchmark' on page." do
|
||||
expect(last_response.body).to(include('Add new benchmark'))
|
||||
end
|
||||
|
Reference in New Issue
Block a user