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.
This commit is contained in:
Robb Kidd 2012-05-15 19:20:15 -04:00
parent 435fd8f087
commit 0a9a2c2a0b
3 changed files with 9 additions and 9 deletions

View file

@ -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