more tests fixed
This commit is contained in:
parent
b059de2ac7
commit
752eb2c11d
|
@ -1,14 +1,8 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Issue do
|
||||
it { should include_module(Votes) }
|
||||
end
|
||||
|
||||
describe MergeRequest do
|
||||
let(:merge_request) { FactoryGirl.create(:merge_request_with_diffs) }
|
||||
|
||||
it { should include_module(Votes) }
|
||||
|
||||
describe "#upvotes" do
|
||||
it "with no notes has a 0/0 score" do
|
||||
merge_request.upvotes.should == 0
|
||||
|
|
|
@ -233,9 +233,10 @@ describe Notify do
|
|||
commit.stub(:safe_message).and_return('some message')
|
||||
end
|
||||
end
|
||||
|
||||
before(:each) { note.stub(:noteable).and_return(commit) }
|
||||
|
||||
subject { Notify.note_commit_email(recipient.id, note.id) }
|
||||
subject { Notify.note_commit_email(recipient.email, note.id) }
|
||||
|
||||
it_behaves_like 'a note email'
|
||||
|
||||
|
|
|
@ -41,8 +41,9 @@ describe NoteObserver do
|
|||
|
||||
it 'notifies the author of a commit when flagged to notify the author' do
|
||||
note.stub(:notify_author).and_return(true)
|
||||
note.stub(:noteable).and_return(double(author_email: 'test@test.com'))
|
||||
note.stub(:id).and_return(42)
|
||||
author = double :user, id: 1
|
||||
author = double :user, id: 1, email: 'test@test.com'
|
||||
note.stub(:commit_author).and_return(author)
|
||||
Notify.should_receive(:note_commit_email)
|
||||
|
||||
|
|
Loading…
Reference in a new issue