Commit 752eb2c1 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

more tests fixed

parent b059de2a
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)
......
Markdown is supported
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