spec/lib/appsignal/event/moped_event_spec.rb in appsignal-0.11.0.beta.1 vs spec/lib/appsignal/event/moped_event_spec.rb in appsignal-0.11.0.beta.2

- old
+ new

@@ -120,36 +120,36 @@ :flags => [] ) end end - context "Moped::Protocol::Other" do + context "Moped::Protocol::KillCursors" do let(:payload) do double( - :full_collection_name => 'database.collection', - :class => double(:to_s => 'Moped::Protocol::Other') + :number_of_cursor_ids => 2, + :class => double(:to_s => 'Moped::Protocol::KillCursors') ) end it "should transform the payload" do expect( event.payload_from_op(payload) ).to eq( - :type => "Other", - :database => "database.collection" + :type => "KillCursors", + :number_of_cursor_ids => 2 ) end end - context "Moped::Protocol::KillCursors" do + context "Moped::Protocol::Other" do let(:payload) do double( :full_collection_name => 'database.collection', - :class => double(:to_s => 'Moped::Protocol::KillCursors') + :class => double(:to_s => 'Moped::Protocol::Other') ) end it "should transform the payload" do expect( event.payload_from_op(payload) ).to eq( - :type => "KillCursors", + :type => "Other", :database => "database.collection" ) end end end