mirror of
https://github.com/plashchynski/crono.git
synced 2026-05-29 19:20:42 +02:00
Add specs to test error marks
This commit is contained in:
@@ -19,6 +19,12 @@ describe Crono::Web do
|
|||||||
expect(last_response).to be_ok
|
expect(last_response).to be_ok
|
||||||
expect(last_response.body).to include @test_job_id
|
expect(last_response.body).to include @test_job_id
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "should show a error mark when a job is unhealthy" do
|
||||||
|
@test_job.update(healthy: false)
|
||||||
|
get '/'
|
||||||
|
expect(last_response.body).to include "Error"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "/job/:id" do
|
describe "/job/:id" do
|
||||||
@@ -28,5 +34,11 @@ describe Crono::Web do
|
|||||||
expect(last_response.body).to include @test_job_id
|
expect(last_response.body).to include @test_job_id
|
||||||
expect(last_response.body).to include @test_job_log
|
expect(last_response.body).to include @test_job_log
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "should show a message about the unhealthy job" do
|
||||||
|
@test_job.update(healthy: false)
|
||||||
|
get "/job/#{@test_job.id}"
|
||||||
|
expect(last_response.body).to include "An error occurs during the last execution of this job"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user