Fix CommanderAgent not working when it is scheduled or manually run('check' function typo).

Brian Petro 9 anos atrás
pai
commit
2f57fce8cb

+ 1 - 1
app/models/agents/commander_agent.rb

@@ -36,7 +36,7 @@ module Agents
36 36
       true
37 37
     end
38 38
 
39
-    def check!
39
+    def check
40 40
       control!
41 41
     end
42 42
 

+ 2 - 2
spec/models/agents/commander_agent_spec.rb

@@ -19,10 +19,10 @@ describe Agents::CommanderAgent do
19 19
 
20 20
   it_behaves_like AgentControllerConcern
21 21
 
22
-  describe "check!" do
22
+  describe "check" do
23 23
     it "should command targets" do
24 24
       stub(agent).control!.once { nil }
25
-      agent.check!
25
+      agent.check
26 26
     end
27 27
   end
28 28