summaryrefslogtreecommitdiff
path: root/spec/helpers/ci/runners_helper_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/helpers/ci/runners_helper_spec.rb')
-rw-r--r--spec/helpers/ci/runners_helper_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/helpers/ci/runners_helper_spec.rb b/spec/helpers/ci/runners_helper_spec.rb
new file mode 100644
index 00000000000..e7681df10bd
--- /dev/null
+++ b/spec/helpers/ci/runners_helper_spec.rb
@@ -0,0 +1,18 @@
+require 'spec_helper'
+
+describe Ci::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