From 729e76750cd044b9b7c6b996a4f77e32f02c54cb Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Fri, 8 Apr 2022 18:18:24 +1000 Subject: [PATCH] test: add paths spec --- spec/lib/pact_broker/api/paths_spec.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 spec/lib/pact_broker/api/paths_spec.rb diff --git a/spec/lib/pact_broker/api/paths_spec.rb b/spec/lib/pact_broker/api/paths_spec.rb new file mode 100644 index 000000000..00c0a978e --- /dev/null +++ b/spec/lib/pact_broker/api/paths_spec.rb @@ -0,0 +1,20 @@ +require "pact_broker/api/paths" + +module PactBroker + module Api + module Paths + describe "is_badge_path?" do + + BADGE_ROUTES = PactBroker.routes.select{ | route | route.path_include?("/badge") }.collect(&:path) + + BADGE_ROUTES.each do | path | + context "for #{path}" do + it "returns truthy" do + expect(Paths.is_badge_path?(path)).to be_truthy + end + end + end + end + end + end +end