Adding more unit tests
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2025-08-20 22:54:23 -04:00
parent 8c5f510c70
commit 619c122769
3 changed files with 150 additions and 1 deletions

View File

@@ -114,4 +114,24 @@ RSpec.describe(BenchmarkController) do
expect(last_response.body).to(include("#{@benchmark.name}"))
end
end
# GET /benchmark/:benchmark_id/edit - page for editing a benchmark model
describe 'GET /benchmark/:benchmark_id/edit' do
before do
@benchmark = Benchmark.create(name: 'Test Benchmark', scoring: 'fps')
get "/benchmark/#{@benchmark.id}/edit"
end
it 'Benchmark edit page returns 200.' do
expect(last_response).to(be_ok)
end
it 'Benchmark edit page is an HTML response' do
expect(last_response['Content-Type']).to(include('text/html'))
end
it 'Benchmark edit page contains "Editing: <benchmark name>" on page.' do
expect(last_response.body).to(include("Editing: #{@benchmark.name}"))
end
end
end