mirror of
https://github.com/Fishwaldo/huginn.git
synced 2025-03-15 19:31:26 +00:00
Odds and ends (#1866)
* Fix brittle spec * remove unused module * Fix another flaky test
This commit is contained in:
parent
98f4310940
commit
af5c5b5f62
3 changed files with 5 additions and 3 deletions
|
@ -1,6 +1,5 @@
|
|||
module Agents
|
||||
class LiquidOutputAgent < Agent
|
||||
include WebRequestConcern
|
||||
include FormConfigurable
|
||||
|
||||
cannot_be_scheduled!
|
||||
|
|
|
@ -101,9 +101,9 @@ describe JobsController do
|
|||
end
|
||||
|
||||
it "run the queued job" do
|
||||
expect(Delayed::Job.last.run_at.to_s).not_to eq(Time.zone.now.to_s)
|
||||
expect(Delayed::Job.last.run_at.to_i).not_to be_within(2).of(Time.zone.now.to_i)
|
||||
post :retry_queued
|
||||
expect(Delayed::Job.last.run_at.to_s).to eq(Time.zone.now.to_s)
|
||||
expect(Delayed::Job.last.run_at.to_i).to be_within(2).of(Time.zone.now.to_i)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -63,6 +63,7 @@ describe "Creating a new agent", js: true do
|
|||
|
||||
it "does not send previously configured sources when the current agent does not support them" do
|
||||
select2("Website Agent scrapes", from: "Type")
|
||||
sleep 0.5
|
||||
select2("SF Weather", from: 'Sources')
|
||||
select2("Webhook Agent", from: "Type")
|
||||
fill_in(:agent_name, with: "No sources")
|
||||
|
@ -74,6 +75,7 @@ describe "Creating a new agent", js: true do
|
|||
|
||||
it "does not send previously configured control targets when the current agent does not support them" do
|
||||
select2("Commander Agent", from: "Type")
|
||||
sleep 0.5
|
||||
select2("SF Weather", from: 'Control targets')
|
||||
select2("Webhook Agent", from: "Type")
|
||||
fill_in(:agent_name, with: "No control targets")
|
||||
|
@ -85,6 +87,7 @@ describe "Creating a new agent", js: true do
|
|||
|
||||
it "does not send previously configured receivers when the current agent does not support them" do
|
||||
select2("Website Agent scrapes", from: "Type")
|
||||
sleep 0.5
|
||||
select2("ZKCD", from: 'Receivers')
|
||||
select2("Email Agent", from: "Type")
|
||||
fill_in(:agent_name, with: "No receivers")
|
||||
|
|
Loading…
Add table
Reference in a new issue