Skip to content
Snippets Groups Projects
Commit b510f8c4 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Fixed tests

parent 4398bdf2
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -85,7 +85,7 @@ describe IssueObserver do
 
it 'notification is delivered if the issue being closed' do
issue.stub(:is_being_closed?).and_return(true)
Notify.should_receive(:issue_status_changed_email).twice
Notify.should_receive(:issue_status_changed_email).twice.and_return(stub(deliver: true))
Note.should_receive(:create_status_change_note).with(issue, some_user, 'closed')
 
subject.after_update(issue)
Loading
Loading
@@ -104,7 +104,7 @@ describe IssueObserver do
issue_without_assignee.stub(:is_being_reassigned?).and_return(false)
issue_without_assignee.stub(:is_being_closed?).and_return(true)
issue_without_assignee.stub(:is_being_reopened?).and_return(false)
Notify.should_receive(:issue_status_changed_email).once
Notify.should_receive(:issue_status_changed_email).once.and_return(stub(deliver: true))
Note.should_receive(:create_status_change_note).with(issue_without_assignee, some_user, 'closed')
 
subject.after_update(issue_without_assignee)
Loading
Loading
@@ -128,7 +128,7 @@ describe IssueObserver do
 
it 'notification is delivered if the issue being reopened' do
issue.stub(:is_being_reopened?).and_return(true)
Notify.should_receive(:issue_status_changed_email).twice
Notify.should_receive(:issue_status_changed_email).twice.and_return(stub(deliver: true))
Note.should_receive(:create_status_change_note).with(issue, some_user, 'reopened')
 
subject.after_update(issue)
Loading
Loading
@@ -147,7 +147,7 @@ describe IssueObserver do
issue_without_assignee.stub(:is_being_reassigned?).and_return(false)
issue_without_assignee.stub(:is_being_closed?).and_return(false)
issue_without_assignee.stub(:is_being_reopened?).and_return(true)
Notify.should_receive(:issue_status_changed_email).once
Notify.should_receive(:issue_status_changed_email).once.and_return(stub(deliver: true))
Note.should_receive(:create_status_change_note).with(issue_without_assignee, some_user, 'reopened')
 
subject.after_update(issue_without_assignee)
Loading
Loading
Loading
Loading
@@ -15,8 +15,8 @@ describe 'gitlab:app namespace rake task' do
end
 
let :run_rake_task do
Rake::Task["gitlab:app:backup_restore"].reenable
Rake.application.invoke_task "gitlab:app:backup_restore"
Rake::Task["gitlab:backup:restore"].reenable
Rake.application.invoke_task "gitlab:backup:restore"
end
 
context 'gitlab version' do
Loading
Loading
@@ -36,8 +36,8 @@ describe 'gitlab:app namespace rake task' do
 
it 'should invoke restoration on mach' do
YAML.stub :load_file => {:gitlab_version => gitlab_version}
Rake::Task["gitlab:app:db_restore"].should_receive :invoke
Rake::Task["gitlab:app:repo_restore"].should_receive :invoke
Rake::Task["gitlab:backup:db:restore"].should_receive :invoke
Rake::Task["gitlab:backup:repo:restore"].should_receive :invoke
expect { run_rake_task }.to_not raise_error SystemExit
end
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment