Test the payload as well

Chris Eidhof 10 anni fa
parent
commit
1e0cba291e
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      spec/models/agents/pdf_agent_spec.rb

+ 2 - 0
spec/models/agents/pdf_agent_spec.rb

@@ -25,6 +25,8 @@ describe Agents::PdfInfoAgent do
25 25
         mock(HyPDF).pdfinfo('data') { {title: "Huginn"} }
26 26
         agent.receive([@event])
27 27
       }.to change { Event.count }.by(1)
28
+      event = Event.last
29
+      expect(event.payload[:title]).to eq('Huginn')
28 30
     end
29 31
   end
30 32
 end