Skip to content

Commit 0af0691

Browse files
committed
fix: assert provider retrieved successfully before using link
Fixes: #296
1 parent 3ed5680 commit 0af0691

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/pact/hal/entity.rb

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ def get(key, *args)
2323
_link(key).get(*args)
2424
end
2525

26+
def get!(key, *args)
27+
_link(key).get!(*args)
28+
end
29+
2630
def post(key, *args)
2731
_link(key).post(*args)
2832
end

lib/pact/provider/verification_results/publish.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def provider_name
135135
end
136136

137137
def provider_entity
138-
@provider_entity ||= pact_entity.get(PROVIDER_RELATION)
138+
@provider_entity ||= pact_entity.get!(PROVIDER_RELATION)
139139
end
140140
end
141141
end

0 commit comments

Comments
 (0)