2019-07-25 05:27:42 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-06-12 21:37:43 +00:00
|
|
|
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
|
2017-02-05 18:04:23 +00:00
|
|
|
end
|
2017-03-17 19:36:46 +00:00
|
|
|
|
|
|
|
RSpec::Matchers.define :gitaly_request_with_params do |params|
|
|
|
|
match do |actual|
|
2019-07-03 03:23:55 +00:00
|
|
|
params.reduce(true) { |r, (key, val)| r && actual[key.to_s] == val }
|
2017-03-17 19:36:46 +00:00
|
|
|
end
|
|
|
|
end
|