BigW Consortium Gitlab

Commit 28da2a8b by Dmitriy Zaporozhets

Monkeypatch satellite call for merge request in tests

parent 42ce2c10
require 'gitlab/satellite/satellite'
class MergeRequestsController < ProjectResourceController
before_filter :module_enabled
before_filter :merge_request, only: [:edit, :update, :show, :commits, :diffs, :automerge, :automerge_check, :ci_status]
......
require "repository"
require "project"
require "merge_request"
require "shell"
# Stubs out all Git repository access done by models so that specs can run
......@@ -32,6 +33,12 @@ class Project
end
end
class MergeRequest
def can_be_merged
true
end
end
class GitLabTestRepo < Repository
def repo
@repo ||= Grit::Repo.new(Rails.root.join('tmp', 'repositories', 'gitlabhq'))
......
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