fixed test using repo with commits but old factory
This commit is contained in:
parent
3b88636d3c
commit
f536c13355
8 changed files with 10 additions and 19 deletions
|
@ -5,7 +5,7 @@ describe Notify do
|
|||
include EmailSpec::Matchers
|
||||
|
||||
let(:recipient) { create(:user, email: 'recipient@example.com') }
|
||||
let(:project) { create(:project) }
|
||||
let(:project) { create(:project_with_code) }
|
||||
|
||||
shared_examples 'a multiple recipients email' do
|
||||
it 'is sent to the given recipient' do
|
||||
|
@ -277,14 +277,7 @@ describe Notify do
|
|||
end
|
||||
|
||||
describe 'on a commit' do
|
||||
let(:commit) do
|
||||
mock(:commit).tap do |commit|
|
||||
commit.stub(:id).and_return('fauxsha1')
|
||||
commit.stub(:project).and_return(project)
|
||||
commit.stub(:short_id).and_return('fauxsha1')
|
||||
commit.stub(:safe_message).and_return('some message')
|
||||
end
|
||||
end
|
||||
let(:commit) { project.repository.commit }
|
||||
|
||||
before(:each) { note.stub(:noteable).and_return(commit) }
|
||||
|
||||
|
@ -297,7 +290,7 @@ describe Notify do
|
|||
end
|
||||
|
||||
it 'contains a link to the commit' do
|
||||
should have_body_text /fauxsha1/
|
||||
should have_body_text commit.short_id
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue