|
@@ -59,9 +59,11 @@ describe Agents::RssAgent do
|
|
|
agent.check
|
|
|
}.to change { agent.events.count }.by(20)
|
|
|
|
|
|
- event = agent.events.last
|
|
|
- expect(event.payload['url']).to eq("https://github.com/cantino/huginn/commit/d0a844662846cf3c83b94c637c1803f03db5a5b0")
|
|
|
- expect(event.payload['urls']).to eq(["https://github.com/cantino/huginn/commit/d0a844662846cf3c83b94c637c1803f03db5a5b0"])
|
|
|
+ first, *, last = agent.events.last(20)
|
|
|
+ expect(first.payload['url']).to eq("https://github.com/cantino/huginn/commit/d0a844662846cf3c83b94c637c1803f03db5a5b0")
|
|
|
+ expect(first.payload['urls']).to eq(["https://github.com/cantino/huginn/commit/d0a844662846cf3c83b94c637c1803f03db5a5b0"])
|
|
|
+ expect(last.payload['url']).to eq("https://github.com/cantino/huginn/commit/d465158f77dcd9078697e6167b50abbfdfa8b1af")
|
|
|
+ expect(last.payload['urls']).to eq(["https://github.com/cantino/huginn/commit/d465158f77dcd9078697e6167b50abbfdfa8b1af"])
|
|
|
end
|
|
|
|
|
|
it "should track ids and not re-emit the same item when seen again" do
|