2015-08-26 01:42:46 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2015-09-29 14:26:40 +00:00
|
|
|
describe RunnersHelper do
|
2015-08-26 01:42:46 +00:00
|
|
|
it "returns - not contacted yet" do
|
2015-09-15 19:27:04 +00:00
|
|
|
runner = FactoryGirl.build :ci_runner
|
|
|
|
expect(runner_status_icon(runner)).to include("not connected yet")
|
2015-08-26 01:42:46 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
it "returns offline text" do
|
2015-09-15 19:27:04 +00:00
|
|
|
runner = FactoryGirl.build(:ci_runner, contacted_at: 1.day.ago, active: true)
|
|
|
|
expect(runner_status_icon(runner)).to include("Runner is offline")
|
2015-08-26 01:42:46 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
it "returns online text" do
|
2015-10-13 00:41:25 +00:00
|
|
|
runner = FactoryGirl.build(:ci_runner, contacted_at: 1.second.ago, active: true)
|
2015-09-15 19:27:04 +00:00
|
|
|
expect(runner_status_icon(runner)).to include("Runner is online")
|
2015-08-26 01:42:46 +00:00
|
|
|
end
|
|
|
|
end
|