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