diff options
| author | Louise Crow <louise.crow@gmail.com> | 2012-08-22 11:23:23 +0100 | 
|---|---|---|
| committer | Louise Crow <louise.crow@gmail.com> | 2012-08-22 11:23:23 +0100 | 
| commit | 829a9af526cecaa53c8810ceb83af26a4f30f238 (patch) | |
| tree | 6b5493ebbbf746a23944d80aac9360c6412e4963 /spec/controllers/request_controller_spec.rb | |
| parent | 744548b8943f38e56a8021fa16c3c00ef11c1356 (diff) | |
Don't send comment alerts for external requests.
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
| -rw-r--r-- | spec/controllers/request_controller_spec.rb | 10 | 
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index 92fde2522..dc970bf5f 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -1639,6 +1639,16 @@ describe RequestController, "comment alerts" do          deliveries.size.should == 0      end +    it 'should not send an alert for a comment on an external request' do +        external_request = info_requests(:external_request) +        external_request.add_comment("This external request is interesting", users(:silly_name_user)) +        # try to send comment alert +        RequestMailer.alert_comment_on_request + +        deliveries = ActionMailer::Base.deliveries +        deliveries.size.should == 0 +    end +      it "should send an alert when there are two new comments" do          # add two comments - the second one sould be ignored, as is by the user who made the request.          # the new comment here, will cause the one in the fixture to be picked up as a new comment by alert_comment_on_request also.  | 
