Adding more 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:
@@ -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
|
||||
|
Reference in New Issue
Block a user