gitlab-org--gitlab-foss/spec/helpers/ci/runners_helper_spec.rb

19 lines
595 B
Ruby
Raw Normal View History

2015-08-25 21:42:46 -04:00
require 'spec_helper'
2015-09-09 08:17:16 -04:00
describe Ci::RunnersHelper do
2015-08-25 21:42:46 -04:00
it "returns - not contacted yet" do
2015-09-15 15:27:04 -04:00
runner = FactoryGirl.build :ci_runner
expect(runner_status_icon(runner)).to include("not connected yet")
2015-08-25 21:42:46 -04:00
end
it "returns offline text" do
2015-09-15 15:27:04 -04: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-25 21:42:46 -04:00
end
it "returns online text" do
2015-09-15 15:27:04 -04:00
runner = FactoryGirl.build(:ci_runner, contacted_at: 1.hour.ago, active: true)
expect(runner_status_icon(runner)).to include("Runner is online")
2015-08-25 21:42:46 -04:00
end
end