spec/lib/flapjack/gateways/web_spec.rb in flapjack-0.6.51 vs spec/lib/flapjack/gateways/web_spec.rb in flapjack-0.6.52

- old
+ new

@@ -214,10 +214,19 @@ get "/contacts" last_response.should be_ok end - it "shows details of an individual contact found by email" + it "shows details of an individual contact found by id" do + contact = mock('contact') + contact.should_receive(:name).twice.and_return("Smithson Smith") + contact.should_receive(:media).exactly(3).times.and_return({}) + contact.should_receive(:entities_and_checks).and_return([]) - it "shows details of an individual contact found by id" + Flapjack::Data::Contact.should_receive(:find_by_id). + with('0362', :redis => @redis).and_return(contact) + + get "/contacts/0362" + last_response.should be_ok + end end