diff options
author | Robb Kidd <robb@thekidds.org> | 2012-05-15 19:20:15 -0400 |
---|---|---|
committer | Robb Kidd <robb@thekidds.org> | 2012-05-15 22:37:34 -0400 |
commit | 0a9a2c2a0b75ba617611382b6335bf2b7fc68b9f (patch) | |
tree | bcc7bf2a73b7758b1d20dccdb8b2759fbda5cd1f /spec/mailers | |
parent | 435fd8f0874450f2da480fa72b0f014d3f1fe271 (diff) | |
download | gitlab-ce-0a9a2c2a0b75ba617611382b6335bf2b7fc68b9f.tar.gz |
Make Notify#note_commit_email resque friendly
Update method to take ids and then perform #finds itself during mailer
queue worker kick-off. Also, the faux SHA1 cannot have underscores or
it will not match the commit pattern defined in the routes.
Diffstat (limited to 'spec/mailers')
-rw-r--r-- | spec/mailers/notify_spec.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index e9c87b9b2e9..7bf42671033 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -190,7 +190,8 @@ describe Notify do describe 'on a commit' do let(:commit) do mock(:commit).tap do |commit| - commit.stub(:id).and_return('faux_sha_1') + commit.stub(:id).and_return('fauxsha1') + commit.stub(:project).and_return(project) end end before(:each) { note.stub(:target).and_return(commit) } @@ -204,7 +205,7 @@ describe Notify do end it 'contains a link to the commit' do - should have_body_text /faux_sha_1/ + should have_body_text /fauxsha1/ end end |