Skip to content

Commit

Permalink
Add read to bot spec
Browse files Browse the repository at this point in the history
  • Loading branch information
devchakraborty committed Jun 8, 2016
1 parent 5e8e145 commit 3bf69b2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions spec/facebook/messenger/bot_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,20 @@
subject.receive({})
end
end

context 'with a read' do
let(:read) { Facebook::Messenger::Incoming::Read.new({}) }

it 'triggers a :read' do
expect(Facebook::Messenger::Incoming).to receive(:parse)
.and_return(read)

expect(Facebook::Messenger::Bot).to receive(:trigger)
.with(:read, read)

subject.receive({})
end
end
end

describe '.trigger' do
Expand Down

0 comments on commit 3bf69b2

Please sign in to comment.