Skip to content

Commit

Permalink
fix: assert provider retrieved successfully before using link
Browse files Browse the repository at this point in the history
Fixes: #296
  • Loading branch information
bethesque committed Nov 9, 2023
1 parent 3ed5680 commit 0af0691
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/pact/hal/entity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ def get(key, *args)
_link(key).get(*args)
end

def get!(key, *args)
_link(key).get!(*args)
end

def post(key, *args)
_link(key).post(*args)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/pact/provider/verification_results/publish.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def provider_name
end

def provider_entity
@provider_entity ||= pact_entity.get(PROVIDER_RELATION)
@provider_entity ||= pact_entity.get!(PROVIDER_RELATION)
end
end
end
Expand Down

0 comments on commit 0af0691

Please sign in to comment.