add spec about "never" schedule

Andrew Cantino преди 11 години
родител
ревизия
d52f8e7d4a
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. 6 0
      spec/models/agent_spec.rb

+ 6 - 0
spec/models/agent_spec.rb

@@ -25,6 +25,12 @@ describe Agent do
25 25
       do_not_allow(Agents::WebsiteAgent).async_check
26 26
       Agent.run_schedule("blah")
27 27
     end
28
+
29
+    it "will not run the 'never' schedule" do
30
+      agents(:bob_weather_agent).update_attribute 'schedule', 'never'
31
+      do_not_allow(Agents::WebsiteAgent).async_check
32
+      Agent.run_schedule("never")
33
+    end
28 34
   end
29 35
 
30 36
   describe "credential" do