Commit 51a3db5e authored by Robb Kidd's avatar Robb Kidd
Browse files

Fix notification for notes on a wall.

The fact that Notes on Walls have a noteable_type value of "nil" got
lost in the refactoring of the observer.
parent 4b11cf45ed21
......@@ -16,7 +16,8 @@
def notify_team_of_new_note(note)
notify_method = 'note_' + note.noteable_type.underscore + '_email'
note_is_on = note.noteable_type || 'Wall'
notify_method = 'note_' + note_is_on.underscore + '_email'
if Notify.respond_to? notify_method
team_without_note_author(note).map do |u|
......@@ -80,7 +80,7 @@
subject.send(:notify_team_of_new_note, note)
it 'a wall' do
Notify.should_receive(:note_wall_email).twice.and_return(double(deliver: true))
subject.send(:notify_team_of_new_note, note)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment