spec/keikoku/notification_spec.rb in keikokuc-0.0.1 vs spec/keikoku/notification_spec.rb in keikokuc-0.0.2
- old
+ new
@@ -6,13 +6,14 @@
fake_client = double
Client.stub(new: fake_client)
fake_client.
should_receive(:post_notification).with do |args|
args[:message].should == 'hello'
- end.
- and_return([{ id: 1 }, nil])
+ args[:account_email].should == 'harold@heroku.com'
+ end.and_return([{ id: 1 }, nil])
- notification = build(:notification, message: 'hello')
+ notification = build(:notification, message: 'hello',
+ account_email: 'harold@heroku.com')
result = notification.publish
result.should be_true
notification.remote_id.should == 1