BigW Consortium Gitlab

runners_helper_spec.rb 593 Bytes
Newer Older
1 2
require 'spec_helper'

3
describe RunnersHelper do
4
  it "returns - not contacted yet" do
5 6
    runner = FactoryGirl.build :ci_runner
    expect(runner_status_icon(runner)).to include("not connected yet")
7 8 9
  end

  it "returns offline text" do
10 11
    runner = FactoryGirl.build(:ci_runner, contacted_at: 1.day.ago, active: true)
    expect(runner_status_icon(runner)).to include("Runner is offline")
12 13 14
  end

  it "returns online text" do
Kamil Trzcinski committed
15
    runner = FactoryGirl.build(:ci_runner, contacted_at: 1.second.ago, active: true)
16
    expect(runner_status_icon(runner)).to include("Runner is online")
17 18
  end
end