2019-10-12 21:52:04 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
RSpec::Matchers.define :gitaly_request_with_path do |storage_name, relative_path|
|
|
|
|
match do |actual|
|
|
|
|
repository = actual.repository
|
|
|
|
|
|
|
|
repository.storage_name == storage_name &&
|
|
|
|
repository.relative_path == relative_path
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
RSpec::Matchers.define :gitaly_request_with_params do |params|
|
|
|
|
match do |actual|
|
2019-09-30 21:07:59 +05:30
|
|
|
params.reduce(true) { |r, (key, val)| r && actual[key.to_s] == val }
|
2017-09-10 17:25:29 +05:30
|
|
|
end
|
2017-08-17 22:00:37 +05:30
|
|
|
end
|