diff options
Diffstat (limited to 'spec/ci/helpers/runners_helper_spec.rb')
-rw-r--r-- | spec/ci/helpers/runners_helper_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/ci/helpers/runners_helper_spec.rb b/spec/ci/helpers/runners_helper_spec.rb new file mode 100644 index 00000000000..02d497b40d2 --- /dev/null +++ b/spec/ci/helpers/runners_helper_spec.rb @@ -0,0 +1,18 @@ +require 'spec_helper' + +describe RunnersHelper do + it "returns - not contacted yet" do + runner = FactoryGirl.build :runner + runner_status_icon(runner).should include("not connected yet") + end + + it "returns offline text" do + runner = FactoryGirl.build(:runner, contacted_at: 1.day.ago, active: true) + runner_status_icon(runner).should include("Runner is offline") + end + + it "returns online text" do + runner = FactoryGirl.build(:runner, contacted_at: 1.hour.ago, active: true) + runner_status_icon(runner).should include("Runner is online") + end +end |